Changeset 134318 in webkit


Ignore:
Timestamp:
Nov 12, 2012, 3:30:38 PM (13 years ago)
Author:
abarth@webkit.org
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r134311 r134318  
     12012-11-12  Adam Barth  <abarth@webkit.org>
     2
     3        [V8] Many things crash when switching to V8's new aligned pointer API
     4        https://bugs.webkit.org/show_bug.cgi?id=101994
     5
     6        Reviewed by Eric Seidel.
     7
     8        When using the aligned pointer API, we need to make sure to initialize
     9        every internal field that we later read because the new API has better
     10        error checks than the old API. This patch explicitly initializes the
     11        enteredIsolatedWorldIndex internal field to zero for main worlds,
     12        fixing the LayoutTest crashes from our previous attempt to move the
     13        aligned pointer API.
     14
     15        * bindings/v8/V8DOMWindowShell.cpp:
     16        (WebCore::V8DOMWindowShell::initializeIfNeeded):
     17
    1182012-11-12  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp

    r134089 r134318  
    339339    }
    340340
    341     // Flag context as isolated.
    342     if (!isMainWorld) {
     341    if (isMainWorld)
     342        setIsolatedWorldField(0, context);
     343    else {
    343344        V8DOMWindowShell* mainWindow = m_frame->script()->existingWindowShell(mainThreadNormalWorld());
    344345        if (mainWindow && !mainWindow->context().IsEmpty())
Note: See TracChangeset for help on using the changeset viewer.