Title: [124938] trunk/Source/WebCore
- Revision
- 124938
- Author
- [email protected]
- Date
- 2012-08-07 16:31:50 -0700 (Tue, 07 Aug 2012)
Log Message
[V8] Replace all V8 undefined values in the rest of custom bindings with v8Undefined()
https://bugs.webkit.org/show_bug.cgi?id=93220
Reviewed by Eric Seidel.
We should use v8Undefined() everywhere in V8 bindings.
This patch replaces all V8 undefined values in the rest of custom bindings
with v8Undefined().
No tests. No change in behavior.
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyQuery): Simple refactoring not related to
this patch. Since other bindings are using 0 instead of v8::None, we should use 0 here too.
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
(WebCore::toV8):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (124937 => 124938)
--- trunk/Source/WebCore/ChangeLog 2012-08-07 23:30:07 UTC (rev 124937)
+++ trunk/Source/WebCore/ChangeLog 2012-08-07 23:31:50 UTC (rev 124938)
@@ -1,5 +1,28 @@
2012-08-07 Kentaro Hara <[email protected]>
+ [V8] Replace all V8 undefined values in the rest of custom bindings with v8Undefined()
+ https://bugs.webkit.org/show_bug.cgi?id=93220
+
+ Reviewed by Eric Seidel.
+
+ We should use v8Undefined() everywhere in V8 bindings.
+ This patch replaces all V8 undefined values in the rest of custom bindings
+ with v8Undefined().
+
+ No tests. No change in behavior.
+
+ * bindings/v8/custom/V8DOMStringMapCustom.cpp:
+ (WebCore::V8DOMStringMap::namedPropertyQuery): Simple refactoring not related to
+ this patch. Since other bindings are using 0 instead of v8::None, we should use 0 here too.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8ScriptProfileCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
+ (WebCore::toV8):
+
+2012-08-07 Kentaro Hara <[email protected]>
+
[V8] Remove #include V8BindingMacros.h
https://bugs.webkit.org/show_bug.cgi?id=93312
Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (124937 => 124938)
--- trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-07 23:30:07 UTC (rev 124937)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-07 23:31:50 UTC (rev 124938)
@@ -378,7 +378,7 @@
{
if (!value->IsObject()) {
V8Proxy::throwTypeError();
- return v8::Local<v8::Value>();
+ return v8Undefined();
}
v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(value));
@@ -388,7 +388,7 @@
if (lengthValue->IsUndefined() || lengthValue->IsNull()) {
V8Proxy::throwTypeError();
- return v8::Local<v8::Value>();
+ return v8Undefined();
}
EXCEPTION_BLOCK(uint32_t, sequenceLength, lengthValue->Int32Value());
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp (124937 => 124938)
--- trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp 2012-08-07 23:30:07 UTC (rev 124937)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp 2012-08-07 23:31:50 UTC (rev 124938)
@@ -42,7 +42,7 @@
{
INC_STATS("DOM.DOMStringMap.NamedPropertyQuery");
if (V8DOMStringMap::toNative(info.Holder())->contains(toWebCoreString(name)))
- return v8Integer(v8::None, info.GetIsolate());
+ return v8Integer(0, info.GetIsolate());
return v8::Handle<v8::Integer>();
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp (124937 => 124938)
--- trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp 2012-08-07 23:30:07 UTC (rev 124937)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp 2012-08-07 23:31:50 UTC (rev 124938)
@@ -605,7 +605,7 @@
// of the frame.
Frame* frame = window->frame();
if (!frame)
- return v8::Handle<v8::Object>();
+ return v8Undefined();
// Special case: Because of evaluateInIsolatedWorld() one DOMWindow can have
// multiple contexts and multiple global objects associated with it. When
@@ -623,7 +623,7 @@
// Otherwise, return the global object associated with this frame.
v8::Handle<v8::Context> context = V8Proxy::context(frame);
if (context.IsEmpty())
- return v8::Handle<v8::Object>();
+ return v8Undefined();
v8::Handle<v8::Object> global = context->Global();
ASSERT(!global.IsEmpty());
Modified: trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp (124937 => 124938)
--- trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp 2012-08-07 23:30:07 UTC (rev 124937)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp 2012-08-07 23:31:50 UTC (rev 124938)
@@ -48,12 +48,12 @@
v8::Local<v8::Function> function = V8ScriptProfile::GetTemplate()->GetFunction();
if (function.IsEmpty()) {
// Return if allocation failed.
- return v8::Local<v8::Object>();
+ return v8Undefined();
}
v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);
if (instance.IsEmpty()) {
// Avoid setting the wrapper if allocation failed.
- return v8::Local<v8::Object>();
+ return v8Undefined();
}
impl->ref();
V8DOMWrapper::setDOMWrapper(instance, &V8ScriptProfile::info, impl);
Modified: trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp (124937 => 124938)
--- trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp 2012-08-07 23:30:07 UTC (rev 124937)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp 2012-08-07 23:31:50 UTC (rev 124938)
@@ -55,7 +55,7 @@
v8::Local<v8::Function> function = V8ScriptProfileNode::GetTemplate()->GetFunction();
if (function.IsEmpty()) {
// Return if allocation failed.
- return v8::Local<v8::Object>();
+ return v8Undefined();
}
v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);
if (instance.IsEmpty()) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes