Changeset 87163 in webkit


Ignore:
Timestamp:
May 24, 2011 10:12:09 AM (13 years ago)
Author:
Philippe Normand
Message:

2011-05-24 Philippe Normand <pnormand@igalia.com>

Reviewed by Andres Kling.

JSAudioContextCustom doesn't encode errors
https://bugs.webkit.org/show_bug.cgi?id=61357

Fix AudioContext return values

  • bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87161 r87163  
     12011-05-24  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Andres Kling.
     4
     5        JSAudioContextCustom doesn't encode errors
     6        https://bugs.webkit.org/show_bug.cgi?id=61357
     7
     8        Fix AudioContext return values
     9
     10        * bindings/js/JSAudioContextCustom.cpp:
     11        (WebCore::JSAudioContextConstructor::constructJSAudioContext):
     12
    1132011-05-24  Rob Buis  <rbuis@rim.com>
    214
  • trunk/Source/WebCore/bindings/js/JSAudioContextCustom.cpp

    r86499 r87163  
    5353    JSAudioContextConstructor* jsConstructor = static_cast<JSAudioContextConstructor*>(exec->callee());
    5454    if (!jsConstructor)
    55       return throwError(exec, createReferenceError(exec, "AudioContext constructor callee is unavailable"));
     55        return throwVMError(exec, createReferenceError(exec, "AudioContext constructor callee is unavailable"));
    5656
    5757    ScriptExecutionContext* scriptExecutionContext = jsConstructor->scriptExecutionContext();
    5858    if (!scriptExecutionContext)
    59       return throwError(exec, createReferenceError(exec, "AudioContext constructor script execution context is unavailable"));
     59        return throwVMError(exec, createReferenceError(exec, "AudioContext constructor script execution context is unavailable"));
    6060       
    6161    if (!scriptExecutionContext->isDocument())
    62       return throwError(exec, createReferenceError(exec, "AudioContext constructor called in a script execution context which is not a document"));
     62        return throwVMError(exec, createReferenceError(exec, "AudioContext constructor called in a script execution context which is not a document"));
    6363
    6464    Document* document = static_cast<Document*>(scriptExecutionContext);
     
    7373        // new AudioContext(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate);
    7474        if (exec->argumentCount() < 3)
    75             return throwError(exec, createSyntaxError(exec, "Not enough arguments"));
     75            return throwVMError(exec, createSyntaxError(exec, "Not enough arguments"));
    7676
    7777        unsigned numberOfChannels = exec->argument(0).toInt32(exec);
     
    8383
    8484    if (!audioContext.get())
    85         return throwError(exec, createReferenceError(exec, "Error creating AudioContext"));
     85        return throwVMError(exec, createReferenceError(exec, "Error creating AudioContext"));
    8686
    8787    return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), audioContext.get())));
Note: See TracChangeset for help on using the changeset viewer.