Fix the error type in JSAudioBufferSourceNodeCustom to pass layout test.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 15:54:45 +0000 (15:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 15:54:45 +0000 (15:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81639

Patch by Sanghyun Park <sh919.park@samsung.com> on 2012-03-29
Reviewed by Eric Carlson.

Test : LayoutTest/webaudio/audiobuffersource-channels.html

* bindings/js/JSAudioBufferSourceNodeCustom.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp

index 594703e..0893fa6 100644 (file)
@@ -1,3 +1,14 @@
+2012-03-29  Sanghyun Park  <sh919.park@samsung.com>
+
+        Fix the error type in JSAudioBufferSourceNodeCustom to pass layout test.
+        https://bugs.webkit.org/show_bug.cgi?id=81639
+
+        Reviewed by Eric Carlson.
+
+        Test : LayoutTest/webaudio/audiobuffersource-channels.html
+
+        * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
+
 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Web Inspector: Existing UISourceCode should be loaded on scripts panel creation/reset.
index 2d917eb..d7441df 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010, Google Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,12 +43,12 @@ void JSAudioBufferSourceNode::setBuffer(ExecState* exec, JSValue value)
     AudioBufferSourceNode* imp = static_cast<AudioBufferSourceNode*>(impl());
     AudioBuffer* buffer = toAudioBuffer(value);
     if (!buffer) {
-        throwError(exec, createSyntaxError(exec, "Value is not of type AudioBuffer"));
+        throwError(exec, createTypeError(exec, "Value is not of type AudioBuffer"));
         return;
     }
     
     if (!imp->setBuffer(buffer))
-        throwError(exec, createSyntaxError(exec, "AudioBuffer unsupported number of channels"));
+        throwError(exec, createTypeError(exec, "AudioBuffer unsupported number of channels"));
 }
 
 } // namespace WebCore