Changeset 87163 in webkit
- Timestamp:
- May 24, 2011 10:12:09 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r87161 r87163 1 2011-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 1 13 2011-05-24 Rob Buis <rbuis@rim.com> 2 14 -
trunk/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
r86499 r87163 53 53 JSAudioContextConstructor* jsConstructor = static_cast<JSAudioContextConstructor*>(exec->callee()); 54 54 if (!jsConstructor) 55 return throwError(exec, createReferenceError(exec, "AudioContext constructor callee is unavailable"));55 return throwVMError(exec, createReferenceError(exec, "AudioContext constructor callee is unavailable")); 56 56 57 57 ScriptExecutionContext* scriptExecutionContext = jsConstructor->scriptExecutionContext(); 58 58 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")); 60 60 61 61 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")); 63 63 64 64 Document* document = static_cast<Document*>(scriptExecutionContext); … … 73 73 // new AudioContext(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate); 74 74 if (exec->argumentCount() < 3) 75 return throw Error(exec, createSyntaxError(exec, "Not enough arguments"));75 return throwVMError(exec, createSyntaxError(exec, "Not enough arguments")); 76 76 77 77 unsigned numberOfChannels = exec->argument(0).toInt32(exec); … … 83 83 84 84 if (!audioContext.get()) 85 return throw Error(exec, createReferenceError(exec, "Error creating AudioContext"));85 return throwVMError(exec, createReferenceError(exec, "Error creating AudioContext")); 86 86 87 87 return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), audioContext.get())));
Note: See TracChangeset
for help on using the changeset viewer.