Bug 111114 - [V8] Remove the world->isMainWorld() check from minorGCPrologue()
Summary: [V8] Remove the world->isMainWorld() check from minorGCPrologue()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-28 14:34 PST by Kentaro Hara
Modified: 2013-02-28 15:27 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.96 KB, patch)
2013-02-28 14:36 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (5.78 KB, patch)
2013-02-28 14:37 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2013-02-28 14:34:36 PST
A couple of weeks ago, I introduced the following check to minorGCPrologue() in r142419.

  void minorGCPrologue() {
    // A minor GC can handle the main world only.
    DOMWrapperWorld* world = worldForEnteredContextWithoutContextCheck();
    if (world && world->isMainWorld()) {
      MinorGCWrapperVisitor visitor(isolate);
      v8::V8::VisitHandlesForPartialDependence(isolate, &visitor);
      visitor.notifyFinished();
    }
  }

- The check makes no sense. A GC should not care about what world we are in. There is no concept of worlds in GC.

- worldForEnteredContextWithoutContextCheck() returns 0 for the main world. So if a GC runs in the main world, the minor DOM GC is skipped.

- worldForEnteredContextWithoutContextCheck() caused a Chromium crash (https://code.google.com/p/chromium/issues/detail?id=177587)

We should remove the check.
Comment 1 Kentaro Hara 2013-02-28 14:36:20 PST
Created attachment 190810 [details]
Patch
Comment 2 Kentaro Hara 2013-02-28 14:37:17 PST
Created attachment 190811 [details]
Patch
Comment 3 WebKit Review Bot 2013-02-28 15:27:40 PST
Comment on attachment 190811 [details]
Patch

Clearing flags on attachment: 190811

Committed r144381: <http://trac.webkit.org/changeset/144381>
Comment 4 WebKit Review Bot 2013-02-28 15:27:43 PST
All reviewed patches have been landed.  Closing bug.