Bug 49115

Summary: Add custom bindings for AudioContext
Product: WebKit Reporter: Chris Rogers <crogers>
Component: New BugsAssignee: Chris Rogers <crogers>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, kbr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

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
Patch (5.96 KB, patch)
2010-11-08 18:27 PST, Chris Rogers
no flags
Patch (6.25 KB, patch)
2010-11-08 18:58 PST, Chris Rogers
no flags
Chris Rogers
Comment 1 2010-11-05 17:19:59 PDT
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
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
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.