LayoutTests/ChangeLog

 12011-08-18 Kentaro Hara <haraken@google.com>
 2
 3 A Worker constructor should throw TypeError, when the number of arguments is not enough
 4 https://bugs.webkit.org/show_bug.cgi?id=66456
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
 9
 10 * fast/workers/worker-constructor-expected.txt: Changed SyntaxError to TypeError.
 11
1122011-08-16 Tony Chang <tony@chromium.org>
213
314 [chromium] fast/css/custom-font-xheight.html is asserting on all

LayoutTests/fast/workers/worker-constructor-expected.txt

@@Test Worker constructor functionality. Should print a series of PASS messages, f
22
33PASS: toString exception propagated correctly.
44PASS: trying to create workers recursively resulted in an exception (RangeError: Maximum call stack size exceeded.)
5 PASS: invoking Worker constructor without arguments resulted in an exception (SyntaxError: Not enough arguments)
 5PASS: invoking Worker constructor without arguments resulted in an exception (TypeError: Not enough arguments)
66PASS: invoking Worker constructor with empty script URL resulted in an exception (Error: SYNTAX_ERR: DOM Exception 12)
77PASS: invoking Worker constructor with invalid script URL resulted in an exception (Error: SYNTAX_ERR: DOM Exception 12)
88PASS: onerror invoked for a script that could not be loaded.

Source/WebCore/ChangeLog

 12011-08-18 Kentaro Hara <haraken@google.com>
 2
 3 A Worker constructor should throw TypeError, when the number of arguments is not enough
 4 https://bugs.webkit.org/show_bug.cgi?id=66456
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
 9
 10 Test: fast/workers/worker-constructor.html
 11
 12 * bindings/js/JSWorkerCustom.cpp:
 13 (WebCore::JSWorkerConstructor::constructJSWorker): Changed SyntaxError to TypeError.
 14 * bindings/v8/custom/V8WorkerCustom.cpp:
 15 (WebCore::V8Worker::constructorCallback): Changed SyntaxError to TypeError.
 16
1172011-08-16 Joseph Pecoraro <joepeck@webkit.org>
218
319 Unreviewed Chromium Windows build fix after r93140. Take 4.

Source/WebCore/bindings/js/JSWorkerCustom.cpp

@@EncodedJSValue JSC_HOST_CALL JSWorkerConstructor::constructJSWorker(ExecState* e
4949 JSWorkerConstructor* jsConstructor = static_cast<JSWorkerConstructor*>(exec->callee());
5050
5151 if (!exec->argumentCount())
52  return throwVMError(exec, createSyntaxError(exec, "Not enough arguments"));
 52 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
5353
5454 UString scriptURL = exec->argument(0).toString(exec);
5555 if (exec->hadException())

Source/WebCore/bindings/v8/custom/V8WorkerCustom.cpp

@@v8::Handle<v8::Value> V8Worker::constructorCallback(const v8::Arguments& args)
5555 return throwError("DOM object constructor cannot be called as a function.");
5656
5757 if (!args.Length())
58  return throwError("Not enough arguments", V8Proxy::SyntaxError);
 58 return throwError("Not enough arguments", V8Proxy::TypeError);
5959
6060 v8::TryCatch tryCatch;
6161 v8::Handle<v8::String> scriptUrl = args[0]->ToString();