Bug 110177 - [JS Binding] ScriptObject default constructor should initialize the Script State to 0
Summary: [JS Binding] ScriptObject default constructor should initialize the Script St...
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: Vivek Galatage
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-18 22:25 PST by Vivek Galatage
Modified: 2013-02-21 11:22 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.45 KB, patch)
2013-02-18 22:28 PST, Vivek Galatage
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vivek Galatage 2013-02-18 22:25:54 PST
ScriptObject default constructor should initialize the Script State to 0.

V8 binding has already done the initialization( http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/v8/ScriptObject.h#L47 ). 

Adding it for JS binding. Patch follows.
Comment 1 Vivek Galatage 2013-02-18 22:28:45 PST
Created attachment 188989 [details]
Patch
Comment 2 Geoffrey Garen 2013-02-18 23:01:59 PST
Is there a regression test for this?
Comment 3 Vivek Galatage 2013-02-18 23:16:55 PST
(In reply to comment #2)
> Is there a regression test for this?

Unfortunately I couldn't find any regression test handy for this at the moment. I am trying to create empty InjectedScript in a case when the JavaScript is disabled across the browser. During this, I found that the ScriptState is not initialized to 0.
Comment 4 Vivek Galatage 2013-02-21 11:08:31 PST
@Geoffrey

I am not sure how to write a test case for this error scenario as I am finding it as a non-trivial case. Do you have any suggestion about writing the test scenario for it? Thank you.
Comment 5 Geoffrey Garen 2013-02-21 11:09:30 PST
Comment on attachment 188989 [details]
Patch

OK. r=me
Comment 6 Vivek Galatage 2013-02-21 11:11:32 PST
Comment on attachment 188989 [details]
Patch

Thank you!
Comment 7 WebKit Review Bot 2013-02-21 11:22:07 PST
Comment on attachment 188989 [details]
Patch

Clearing flags on attachment: 188989

Committed r143631: <http://trac.webkit.org/changeset/143631>
Comment 8 WebKit Review Bot 2013-02-21 11:22:11 PST
All reviewed patches have been landed.  Closing bug.