Changeset 125656 in webkit
- Timestamp:
- Aug 15, 2012 1:26:06 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r125655 r125656 1 2012-08-15 Adam Barth <abarth@webkit.org> 2 3 [Chromium] fast/dom/Window/dom-access-from-closure-window.html is flaky on Linux 4 https://bugs.webkit.org/show_bug.cgi?id=94060 5 6 Reviewed by Kentaro Hara. 7 8 Ensure that collecting garbage doesn't change the behavior of this test 9 (compared with dom-access-from-closure-window.html). 10 11 * fast/dom/Window/dom-access-from-closure-window-with-gc-expected.txt: Added. 12 * fast/dom/Window/dom-access-from-closure-window-with-gc.html: Added. 13 1 14 2012-08-15 Yuta Kitamura <yutak@google.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r125654 r125656 1 2012-08-15 Adam Barth <abarth@webkit.org> 2 3 [Chromium] fast/dom/Window/dom-access-from-closure-window.html is flaky on Linux 4 https://bugs.webkit.org/show_bug.cgi?id=94060 5 6 Reviewed by Kentaro Hara. 7 8 Previously, the V8 garbage collector might have collected the Document 9 wrapper before the DOMWindow wrapper because we overwrite the 10 "document" property of the DOMWindow during navigation. 11 12 This patch adds a hidden document property on the global object to 13 ensure that the Document wrapper lives at least as long as the 14 DOMWindow wrapper, ensuring that DOMWindows that we obtain from V8 15 always have non-null Document objects. 16 17 The JavaScriptCore bindings already have this behavior. 18 19 Test: fast/dom/Window/dom-access-from-closure-window-with-gc.html 20 21 * bindings/v8/V8DOMWindowShell.cpp: 22 (WebCore::V8DOMWindowShell::updateDocumentWrapperCache): 23 * bindings/v8/V8HiddenPropertyName.h: 24 (WebCore): 25 1 26 2012-08-14 Andrey Kosyakov <caseq@chromium.org> 2 27 -
trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
r125615 r125656 489 489 ASSERT(documentWrapper->IsObject()); 490 490 m_context->Global()->ForceSet(v8::String::New("document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete)); 491 492 // We also stash a reference to the document on the real global object so that 493 // DOMWindow objects we obtain from JavaScript references are guaranteed to have 494 // live Document objects. 495 v8::Handle<v8::Object> v8RealGlobal = v8::Handle<v8::Object>::Cast(m_context->Global()->GetPrototype()); 496 v8RealGlobal->SetHiddenValue(V8HiddenPropertyName::document(), documentWrapper); 491 497 } 492 498 -
trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h
r120347 r125656 37 37 38 38 #define V8_HIDDEN_PROPERTIES(V) \ 39 V(attributeListener) \ 40 V(document) \ 41 V(domStringMap) \ 42 V(domTokenList) \ 43 V(event) \ 39 44 V(listener) \ 40 V( attributeListener) \45 V(ownerNode) \ 41 46 V(scriptState) \ 42 47 V(sleepFunction) \ 43 V(toStringString) \44 V(event) \45 48 V(state) \ 46 V(domStringMap) \ 47 V(domTokenList) \ 48 V(ownerNode) \ 49 V(textTracks) 49 V(textTracks) \ 50 V(toStringString) 50 51 51 52 class V8HiddenPropertyName {
Note: See TracChangeset
for help on using the changeset viewer.