Bug 103210 - [V8] Remove WorkerContextExecutionProxy
Summary: [V8] Remove WorkerContextExecutionProxy
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:
: 97071 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-25 16:42 PST by Kentaro Hara
Modified: 2012-11-26 17:04 PST (History)
3 users (show)

See Also:


Attachments
Patch (25.30 KB, patch)
2012-11-25 17:05 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
patch for landing (24.82 KB, patch)
2012-11-25 17:32 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 2012-11-25 16:42:12 PST
We can move methods of WorkerContextExecutionProxy to WorkerScriptController.
Comment 1 Kentaro Hara 2012-11-25 17:05:53 PST
Created attachment 175900 [details]
Patch
Comment 2 Adam Barth 2012-11-25 17:28:07 PST
Comment on attachment 175900 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=175900&action=review

> Source/WebCore/bindings/v8/V8WorkerContextEventListener.cpp:64
> +    WorkerScriptController* script = static_cast<WorkerContext*>(context)->script();

We lost the ASSERT here.  We should add it back.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:62
> +    , m_disableEvalPending(String())

No need for this line.  The compiler will init this variable for you.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:97
> +    // Bail out if the context has already been initialized.

I'd remove this comment.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:101
> +    // Create a new environment

This one too

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:129
> +    // Bail out if allocation failed.

ditto

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:135
> +    // Wrap the object.

ditto

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:149
> +    v8::HandleScope hs;

hs -> handleScope

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:160
> +    v8::Context::Scope scope(m_context.get());

I'm surprised we don't need to create a new local handle here, but that's something to worry about in the future.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:162
> +    v8::TryCatch exceptionCatcher;

exceptionCatcher -> block

> Source/WebCore/bindings/v8/WorkerScriptController.h:101
>      private:

Please add a blank line above this line.
Comment 3 Kentaro Hara 2012-11-25 17:32:23 PST
Created attachment 175903 [details]
patch for landing
Comment 4 Kentaro Hara 2012-11-25 17:32:42 PST
All comments addressed. Thanks for reviewing.
Comment 5 WebKit Review Bot 2012-11-26 03:21:36 PST
Comment on attachment 175903 [details]
patch for landing

Clearing flags on attachment: 175903

Committed r135703: <http://trac.webkit.org/changeset/135703>
Comment 6 WebKit Review Bot 2012-11-26 03:21:39 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Kentaro Hara 2012-11-26 17:04:00 PST
*** Bug 97071 has been marked as a duplicate of this bug. ***