Changeset 128094 in webkit
- Timestamp:
- Sep 10, 2012 1:20:58 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128089 r128094 1 2012-09-10 Adam Barth <abarth@chromium.org> 2 3 [V8] Constructors try to handle errors that cannot occur 4 https://bugs.webkit.org/show_bug.cgi?id=96304 5 6 Reviewed by Kentaro Hara. 7 8 There's no reason for constructors to indirect through the Frame. Now 9 that we can reliably get the Document from the v8::Context, we can just 10 grab it without worrying about handling error conditions related to not 11 being able to find the Document. 12 13 * bindings/scripts/CodeGeneratorV8.pm: 14 (GenerateNamedConstructorCallback): 15 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: 16 (WebCore::V8TestNamedConstructorConstructorCallback): 17 * bindings/v8/custom/V8AudioContextCustom.cpp: 18 (WebCore::V8AudioContext::constructorCallback): 19 * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: 20 (WebCore::v8HTMLImageElementConstructorCallback): 21 1 22 2012-09-10 Andrey Kosyakov <caseq@chromium.org> 2 23 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r127997 r128094 2028 2028 return args.Holder(); 2029 2029 2030 Frame* frame = currentFrame(BindingState::instance()); 2031 if (!frame) 2032 return throwError(ReferenceError, "${implClassName} constructor associated frame is unavailable", args.GetIsolate()); 2033 2034 Document* document = frame->document(); 2030 Document* document = currentDocument(BindingState::instance()); 2035 2031 2036 2032 // Make sure the document is added to the DOM Node map. Otherwise, the ${implClassName} instance -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
r127972 r128094 54 54 return args.Holder(); 55 55 56 Frame* frame = currentFrame(BindingState::instance()); 57 if (!frame) 58 return throwError(ReferenceError, "TestNamedConstructor constructor associated frame is unavailable", args.GetIsolate()); 59 60 Document* document = frame->document(); 56 Document* document = currentDocument(BindingState::instance()); 61 57 62 58 // Make sure the document is added to the DOM Node map. Otherwise, the TestNamedConstructor instance -
trunk/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
r126399 r128094 50 50 return args.Holder(); 51 51 52 Frame* frame = currentFrame(BindingState::instance()); 53 if (!frame) 54 return throwError(ReferenceError, "AudioContext constructor associated frame is unavailable", args.GetIsolate()); 55 56 Document* document = frame->document(); 57 if (!document) 58 return throwError(ReferenceError, "AudioContext constructor associated document is unavailable", args.GetIsolate()); 52 Document* document = currentDocument(BindingState::instance()); 59 53 60 54 RefPtr<AudioContext> audioContext; -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
r127946 r128094 56 56 return args.Holder(); 57 57 58 // FIXME: We shouldn't need to go through the Frame to get the Document. 59 Frame* frame = currentFrame(BindingState::instance()); 60 if (!frame) 61 return throwError(ReferenceError, "Image constructor associated frame is unavailable", args.GetIsolate()); 62 63 Document* document = frame->document(); 64 if (!document) 65 return throwError(ReferenceError, "Image constructor associated document is unavailable", args.GetIsolate()); 58 Document* document = currentDocument(BindingState::instance()); 66 59 67 60 // Make sure the document is added to the DOM Node map. Otherwise, the HTMLImageElement instance
Note: See TracChangeset
for help on using the changeset viewer.