[Webkit-unassigned] [Bug 49115] Add custom bindings for AudioContext

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 8 18:38:13 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=49115


Kenneth Russell <kbr at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #73329|review?                     |review-
               Flag|                            |




--- Comment #5 from Kenneth Russell <kbr at google.com>  2010-11-08 18:38:13 PST ---
(From update of attachment 73329)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list