Bug 109523 - [V8] ScheduledAction::m_context can be empty, so we shouldn't retrieve an Isolate by using m_context->GetIsolate()
Summary: [V8] ScheduledAction::m_context can be empty, so we shouldn't retrieve an Iso...
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-11 17:08 PST by Kentaro Hara
Modified: 2013-02-11 18:07 PST (History)
4 users (show)

See Also:


Attachments
Patch (7.95 KB, patch)
2013-02-11 17:11 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-11 17:08:39 PST
Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges

Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate(). This can crash because ScheduledAction::m_context can be empty. Specifically, ScheduledAction::m_context is set to ScriptController::currentWorldContext(), which can return an empty handle when a frame does not exist. In addition, 'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.

Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
Comment 1 Kentaro Hara 2013-02-11 17:11:54 PST
Created attachment 187730 [details]
Patch
Comment 2 Adam Barth 2013-02-11 17:17:02 PST
Comment on attachment 187730 [details]
Patch

ok
Comment 3 Kentaro Hara 2013-02-11 17:17:28 PST
Comment on attachment 187730 [details]
Patch

Thanks!
Comment 4 WebKit Review Bot 2013-02-11 18:07:51 PST
Comment on attachment 187730 [details]
Patch

Clearing flags on attachment: 187730

Committed r142565: <http://trac.webkit.org/changeset/142565>
Comment 5 WebKit Review Bot 2013-02-11 18:07:55 PST
All reviewed patches have been landed.  Closing bug.