WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
49115
Add custom bindings for AudioContext
https://bugs.webkit.org/show_bug.cgi?id=49115
Summary
Add custom bindings for AudioContext
Chris Rogers
Reported
2010-11-05 17:18:25 PDT
Add custom bindings for AudioContext
Attachments
Patch
(5.66 KB, patch)
2010-11-05 17:19 PDT
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Patch
(5.96 KB, patch)
2010-11-08 18:27 PST
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Patch
(6.25 KB, patch)
2010-11-08 18:58 PST
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Rogers
Comment 1
2010-11-05 17:19:59 PDT
Created
attachment 73147
[details]
Patch
Kenneth Russell
Comment 2
2010-11-08 16:57:24 PST
Comment on
attachment 73147
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=73147&action=review
> WebCore/bindings/v8/custom/V8AudioContextCustom.cpp:43 > + return throwError("AudioContext constructor associated frame is unavailable", V8Proxy::ReferenceError);
Why is there a difference between the JS and V8 bindings in whether these values are null-checked at run time? Please make the two bindings work identically. If this isn't supposed to happen then make it an ASSERT.
Chris Rogers
Comment 3
2010-11-08 18:27:07 PST
Created
attachment 73329
[details]
Patch
Chris Rogers
Comment 4
2010-11-08 18:28:49 PST
I've added error checking in the JS custom binding as well.
Kenneth Russell
Comment 5
2010-11-08 18:38:13 PST
Comment on
attachment 73329
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=73329&action=review
> WebCore/bindings/js/JSAudioContextCustom.cpp:40 > + return throwError(exec, createSyntaxError(exec, "AudioContext constructor associated document is unavailable"));
The V8 bindings are throwing a ReferenceError, so to be consistent you should do the same here and below.
> WebCore/bindings/js/JSAudioContextCustom.cpp:42 > + Document* document = static_cast<Document*>(jsConstructor->scriptExecutionContext());
From looking at some of the other custom bindings, you need to check ScriptExecutionContext::isDocument() before casting to Document* to be safe. Since you're already doing the other checking you might as well do this too.
Chris Rogers
Comment 6
2010-11-08 18:58:19 PST
Created
attachment 73335
[details]
Patch
Chris Rogers
Comment 7
2010-11-08 18:59:21 PST
new patch addresses all comments
Kenneth Russell
Comment 8
2010-11-08 19:07:48 PST
Comment on
attachment 73335
[details]
Patch Looks good to me. Thanks for bearing with me on the review.
WebKit Commit Bot
Comment 9
2010-11-09 03:49:18 PST
Comment on
attachment 73335
[details]
Patch Clearing flags on attachment: 73335 Committed
r71619
: <
http://trac.webkit.org/changeset/71619
>
WebKit Commit Bot
Comment 10
2010-11-09 03:49:23 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug