Title: [134369] trunk/Source/WebCore
Revision
134369
Author
[email protected]
Date
2012-11-12 22:59:25 -0800 (Mon, 12 Nov 2012)

Log Message

[V8] Add ASSERT() to guarantee that we don't store NULL pointers to V8 internal fields
https://bugs.webkit.org/show_bug.cgi?id=101054

Reviewed by Adam Barth.

I'm investigating a Chromium crash bug:
http://code.google.com/p/chromium/issues/detail?id=155942

I've not yet identified the root cause (because I can't reproduce
the crash), but it looks like we are storing NULL pointers to
V8 internal fields. Just in case, we can add an ASSERT() to
guarantee that NULL pointers are never stored. (Also I'm hoping
that this ASSERT() will give me more debug information.)

No tests. No change in behavior.

* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::setDOMWrapper):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134368 => 134369)


--- trunk/Source/WebCore/ChangeLog	2012-11-13 06:55:08 UTC (rev 134368)
+++ trunk/Source/WebCore/ChangeLog	2012-11-13 06:59:25 UTC (rev 134369)
@@ -1,3 +1,24 @@
+2012-11-12  Kentaro Hara  <[email protected]>
+
+        [V8] Add ASSERT() to guarantee that we don't store NULL pointers to V8 internal fields
+        https://bugs.webkit.org/show_bug.cgi?id=101054
+
+        Reviewed by Adam Barth.
+
+        I'm investigating a Chromium crash bug:
+        http://code.google.com/p/chromium/issues/detail?id=155942
+
+        I've not yet identified the root cause (because I can't reproduce
+        the crash), but it looks like we are storing NULL pointers to
+        V8 internal fields. Just in case, we can add an ASSERT() to
+        guarantee that NULL pointers are never stored. (Also I'm hoping
+        that this ASSERT() will give me more debug information.)
+
+        No tests. No change in behavior.
+
+        * bindings/v8/V8DOMWrapper.h:
+        (WebCore::V8DOMWrapper::setDOMWrapper):
+
 2012-11-12  Shinya Kawanaka  <[email protected]>
 
         Changing id, className, or attribute should invalidate distribution

Modified: trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h (134368 => 134369)


--- trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h	2012-11-13 06:55:08 UTC (rev 134368)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h	2012-11-13 06:59:25 UTC (rev 134369)
@@ -66,10 +66,12 @@
         static bool maybeDOMWrapper(v8::Handle<v8::Value>);
 #endif
 
-        static void setDOMWrapper(v8::Handle<v8::Object> object, WrapperTypeInfo* type, void* cptr)
+        static void setDOMWrapper(v8::Handle<v8::Object> object, WrapperTypeInfo* type, void* impl)
         {
             ASSERT(object->InternalFieldCount() >= 2);
-            object->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, cptr);
+            ASSERT(impl);
+            ASSERT(type);
+            object->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, impl);
             object->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, type);
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to