Title: [133496] trunk/Source/WebCore
Revision
133496
Author
[email protected]
Date
2012-11-05 10:41:13 -0800 (Mon, 05 Nov 2012)

Log Message

[V8] toV8(impl) should return null if impl is 0
https://bugs.webkit.org/show_bug.cgi?id=101206

Reviewed by Adam Barth.

toV8(impl) should return null if impl is 0. However,
V8HTMLCollection::toV8() does not have the null check.
All other toV8()s return null.

No tests. I think there will be no call path that hits the change.

* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::toV8):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133495 => 133496)


--- trunk/Source/WebCore/ChangeLog	2012-11-05 18:18:10 UTC (rev 133495)
+++ trunk/Source/WebCore/ChangeLog	2012-11-05 18:41:13 UTC (rev 133496)
@@ -1,3 +1,19 @@
+2012-11-05  Kentaro Hara  <[email protected]>
+
+        [V8] toV8(impl) should return null if impl is 0
+        https://bugs.webkit.org/show_bug.cgi?id=101206
+
+        Reviewed by Adam Barth.
+
+        toV8(impl) should return null if impl is 0. However,
+        V8HTMLCollection::toV8() does not have the null check.
+        All other toV8()s return null.
+
+        No tests. I think there will be no call path that hits the change.
+
+        * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+        (WebCore::toV8):
+
 2012-11-05  David Barton  <[email protected]>
 
         Implement SimpleFontData::platformBoundsForGlyph on skia

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp (133495 => 133496)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp	2012-11-05 18:18:10 UTC (rev 133495)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp	2012-11-05 18:41:13 UTC (rev 133496)
@@ -86,6 +86,9 @@
 
 v8::Handle<v8::Value> toV8(HTMLCollection* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
+    if (!impl)
+        return v8NullWithCheck(isolate);
+
     if (impl->type() == DocAll)
         return toV8(static_cast<HTMLAllCollection*>(impl), creationContext, isolate);
     return V8HTMLCollection::wrap(impl, creationContext, isolate);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to