Title: [134318] trunk/Source/WebCore
Revision
134318
Author
[email protected]
Date
2012-11-12 15:30:38 -0800 (Mon, 12 Nov 2012)

Log Message

[V8] Many things crash when switching to V8's new aligned pointer API
https://bugs.webkit.org/show_bug.cgi?id=101994

Reviewed by Eric Seidel.

When using the aligned pointer API, we need to make sure to initialize
every internal field that we later read because the new API has better
error checks than the old API. This patch explicitly initializes the
enteredIsolatedWorldIndex internal field to zero for main worlds,
fixing the LayoutTest crashes from our previous attempt to move the
aligned pointer API.

* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134317 => 134318)


--- trunk/Source/WebCore/ChangeLog	2012-11-12 23:19:44 UTC (rev 134317)
+++ trunk/Source/WebCore/ChangeLog	2012-11-12 23:30:38 UTC (rev 134318)
@@ -1,3 +1,20 @@
+2012-11-12  Adam Barth  <[email protected]>
+
+        [V8] Many things crash when switching to V8's new aligned pointer API
+        https://bugs.webkit.org/show_bug.cgi?id=101994
+
+        Reviewed by Eric Seidel.
+
+        When using the aligned pointer API, we need to make sure to initialize
+        every internal field that we later read because the new API has better
+        error checks than the old API. This patch explicitly initializes the
+        enteredIsolatedWorldIndex internal field to zero for main worlds,
+        fixing the LayoutTest crashes from our previous attempt to move the
+        aligned pointer API.
+
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::V8DOMWindowShell::initializeIfNeeded):
+
 2012-11-12  Simon Fraser  <[email protected]>
 
         Reduce the crazy number of parameters to RenderLayer painting member functions

Modified: trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp (134317 => 134318)


--- trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp	2012-11-12 23:19:44 UTC (rev 134317)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp	2012-11-12 23:30:38 UTC (rev 134318)
@@ -338,8 +338,9 @@
         }
     }
 
-    // Flag context as isolated.
-    if (!isMainWorld) {
+    if (isMainWorld)
+        setIsolatedWorldField(0, context);
+    else {
         V8DOMWindowShell* mainWindow = m_frame->script()->existingWindowShell(mainThreadNormalWorld());
         if (mainWindow && !mainWindow->context().IsEmpty())
             setInjectedScriptContextDebugId(m_context.get(), m_frame->script()->contextDebugId(mainWindow->context()));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to