Changeset 119702 in webkit
- Timestamp:
- Jun 7, 2012 4:06:58 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r119701 r119702 1 2012-06-07 Li Yin <li.yin@intel.com> 2 3 FileAPI: If type consists of non-ASCII characters in Blob constructor, it should throw a SyntaxError. 4 https://bugs.webkit.org/show_bug.cgi?id=88411 5 6 Reviewed by Kentaro Hara. 7 8 From Spec: http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob 9 If type consists of any non-ASCII characters, throw a SyntaxError and 10 return from this algorithm. 11 12 * fast/files/blob-constructor-expected.txt: 13 * fast/files/script-tests/blob-constructor.js: 14 1 15 2012-06-07 Arpita Bahuguna <arpitabahuguna@gmail.com> 2 16 -
trunk/LayoutTests/fast/files/blob-constructor-expected.txt
r115599 r119702 29 29 PASS new Blob([], {endings:throwingObj}) threw exception Error. 30 30 PASS new Blob([], {type:throwingObj}) threw exception Error. 31 PASS new Blob([], {type:'helloî'}) threw exception SyntaxError: type must consist of ASCII characters. 31 32 PASS new Blob([], {endings:throwingObj1, type:throwingObj2}) threw exception Error 1. 32 33 PASS new Blob([], {type:throwingObj2, endings:throwingObj1}) threw exception Error 1. -
trunk/LayoutTests/fast/files/script-tests/blob-constructor.js
r115599 r119702 39 39 shouldThrow("new Blob([], {endings:throwingObj})", "'Error'"); 40 40 shouldThrow("new Blob([], {type:throwingObj})", "'Error'"); 41 shouldThrow("new Blob([], {type:'hello\u00EE'})", "'SyntaxError: type must consist of ASCII characters'"); 41 42 42 43 // Test that order of property bag evaluation is lexigraphical -
trunk/Source/WebCore/ChangeLog
r119701 r119702 1 2012-06-07 Li Yin <li.yin@intel.com> 2 3 FileAPI: If type consists of non-ASCII characters in Blob constructor, it should throw a SyntaxError. 4 https://bugs.webkit.org/show_bug.cgi?id=88411 5 6 Reviewed by Kentaro Hara. 7 8 From spec: http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob 9 If type consists of any non-ASCII characters, throw a SyntaxError and 10 return from this algorithm. 11 This patch checks the String is ASCii or not, if not, throw SyntaxError. 12 13 Test: fast/files/blob-constructor.html 14 15 * bindings/js/JSBlobCustom.cpp: 16 (WebCore::JSBlobConstructor::constructJSBlob): 17 * bindings/v8/custom/V8BlobCustom.cpp: 18 (WebCore::V8Blob::constructorCallback): 19 1 20 2012-06-07 Arpita Bahuguna <arpitabahuguna@gmail.com> 2 21 -
trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp
r115599 r119702 104 104 if (exec->hadException()) 105 105 return JSValue::encode(jsUndefined()); 106 if (!type.containsOnlyASCII()) 107 return throwVMError(exec, createSyntaxError(exec, "type must consist of ASCII characters")); 106 108 } 107 109 -
trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
r119479 r119702 103 103 if (tryCatchType.HasCaught()) 104 104 return throwError(tryCatchType.Exception(), args.GetIsolate()); 105 if (!type.containsOnlyASCII()) 106 return V8Proxy::throwError(V8Proxy::SyntaxError, "type must consist of ASCII characters", args.GetIsolate()); 105 107 } 106 108
Note: See TracChangeset
for help on using the changeset viewer.