Changeset 128513 in webkit
- Timestamp:
- Sep 13, 2012 3:19:43 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r128510 r128513 1 2012-09-13 Adam Barth <abarth@webkit.org> 2 3 REGRESSION(r125126): It made fast/events/keyevent-iframe-removed-crash.html assert 4 https://bugs.webkit.org/show_bug.cgi?id=93654 5 6 Reviewed by Eric Seidel. 7 8 * fast/dom/content-document-prototype-expected.txt: Added. 9 * fast/dom/content-document-prototype.html: Added. 10 - Check that HTMLFrameElement.contentDocument ends up with the 11 right prototype chain. This is a tricky case because not only the 12 prototype chain of the property different from the holder, we 13 never actually touch the DOMWindow in this test case so the 14 prototype chain leads to a global object that doesn't even exist 15 yet! 16 * fast/events/keyevent-iframe-removed-crash.html: 17 - Add a call to gc() so that this test will ASSERT reliabily if we 18 cause a similar problem in the future. 19 1 20 2012-09-13 James Robinson <jamesr@chromium.org> 2 21 -
trunk/LayoutTests/fast/events/keyevent-iframe-removed-crash.html
r120792 r128513 2 2 <html> 3 3 <head> 4 <script src="../../resources/gc.js"></script> 4 5 <script> 5 6 function go() { … … 24 25 25 26 function nuke() { 27 gc(); 26 28 eventSender.keyDown("x") 27 29 testRunner.notifyDone(); -
trunk/Source/WebCore/ChangeLog
r128512 r128513 1 2012-09-13 Adam Barth <abarth@webkit.org> 2 3 REGRESSION(r125126): It made fast/events/keyevent-iframe-removed-crash.html assert 4 https://bugs.webkit.org/show_bug.cgi?id=93654 5 6 Reviewed by Eric Seidel. 7 8 When wrapping a Document, we need to ensure that the global object for 9 the wrapper actually exists before trying to create the wrapper. In 10 other cases in the DOM, we always touch the global object before trying 11 to wrap a given DOM object. For Document, however, 12 HTMLFrameElement.contentDocument is a rare way to get at a DOM object 13 for a global object without first touching the Window object. 14 15 Rather than writing custom bindings for 16 HTMLFrameElement.contentDocument, this patch just makes toJS for 17 Document ensure that toJS for DOMWindow has been called first. The V8 18 bindings have some similar code. 19 20 Test: fast/dom/content-document-prototype.html 21 22 * bindings/js/JSDocumentCustom.cpp: 23 (WebCore::toJS): 24 1 25 2012-09-13 Anders Carlsson <andersca@apple.com> 2 26 -
trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp
r127191 r128513 87 87 return wrapper; 88 88 89 if (DOMWindow* domWindow = document->domWindow()) { 90 globalObject = toJSDOMWindow(toJS(exec, domWindow)); 91 // Creating a wrapper for domWindow might have created a wrapper for document as well. 92 wrapper = getCachedWrapper(currentWorld(exec), document); 93 if (wrapper) 94 return wrapper; 95 } 96 89 97 if (document->isHTMLDocument()) 90 98 wrapper = CREATE_DOM_WRAPPER(exec, globalObject, HTMLDocument, document);
Note: See TracChangeset
for help on using the changeset viewer.