diff options
author | ager@google.com <ager@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-02 12:53:51 +0000 |
---|---|---|
committer | ager@google.com <ager@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-02 12:53:51 +0000 |
commit | 6240776617651b092c498411c696be9ae45a0178 (patch) | |
tree | 60ce243d38ecebd1f669775506b06c18dc4c793a | |
parent | be896a761f3f022200a8e53003da99e132d9d848 (diff) | |
download | chromium_src-6240776617651b092c498411c696be9ae45a0178.zip chromium_src-6240776617651b092c498411c696be9ae45a0178.tar.gz chromium_src-6240776617651b092c498411c696be9ae45a0178.tar.bz2 |
Revert the wrapper context change since it caused layout test
regressions.
Review URL: http://codereview.chromium.org/5670
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2791 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 0 insertions, 80 deletions
diff --git a/webkit/data/layout_tests/chrome/fast/dom/resources/wrapper-context-inner.html b/webkit/data/layout_tests/chrome/fast/dom/resources/wrapper-context-inner.html deleted file mode 100644 index c47aa6e..0000000 --- a/webkit/data/layout_tests/chrome/fast/dom/resources/wrapper-context-inner.html +++ /dev/null @@ -1,28 +0,0 @@ -<html> -<body onload="RunTest()"> -<script> -// Used from the top frame to know when this frame has been loaded. -var loaded = false; - -// After the top frame has accessed the document of this frame, we -// test that the document wrapper was created in this context and -// not in the top context. -function RunTest() { - loaded = true; - if (top.innerDocument) { - var paragraph = document.createElement('p'); - if (HTMLElement.prototype.isPrototypeOf(paragraph)) { - top.WriteOutput("PASS"); - } else { - top.WriteOutput("FAIL"); - } - if (window.layoutTestController) { - layoutTestController.notifyDone(); - } - } else { - setTimeout(RunTest, 100); - } -} -</script> -</body> -</html> diff --git a/webkit/data/layout_tests/chrome/fast/dom/wrapper-context-expected.txt b/webkit/data/layout_tests/chrome/fast/dom/wrapper-context-expected.txt deleted file mode 100644 index 7ef22e9..0000000 --- a/webkit/data/layout_tests/chrome/fast/dom/wrapper-context-expected.txt +++ /dev/null @@ -1 +0,0 @@ -PASS diff --git a/webkit/data/layout_tests/chrome/fast/dom/wrapper-context.html b/webkit/data/layout_tests/chrome/fast/dom/wrapper-context.html deleted file mode 100644 index 3f038d8..0000000 --- a/webkit/data/layout_tests/chrome/fast/dom/wrapper-context.html +++ /dev/null @@ -1,33 +0,0 @@ -<html> -<body onload="AccessInnerDocument()"> -<div id="output"></div> -<iframe id="inner" src="resources/wrapper-context-inner.html"></iframe> -<script> -if (window.layoutTestController) { - layoutTestController.waitUntilDone(); - layoutTestController.dumpAsText(); -} - -// Write to the output div. -function WriteOutput(s) { - var paragraph = document.createElement("p"); - paragraph.innerHTML = s; - document.getElementById("output").appendChild(paragraph); -} - -// Used from the inner frame to know when this frame has accessed -// the document of the inner frame. -var innerDocument; - -// Once the inner frame has loaded, access it's document and assign -// the wrapper to innerDocument. -function AccessInnerDocument() { - if (inner.loaded) { - innerDocument = inner.document; - } else { - setTimeout(AccessInnerDocument, 100); - } -} -</script> -</body> -</html> diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index da3bec6..ae96b63 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -2390,28 +2390,10 @@ v8::Handle<v8::Value> V8Proxy::NodeToV8Object(Node* node) { type = V8ClassIndex::NODE; } - // Find the context to which the node belongs and create the wrapper - // in that context. If the node is not in a document, the current - // context is used. - v8::Local<v8::Context> context; - Document* doc = node->document(); - if (doc) { - context = V8Proxy::GetContext(doc->frame()); - } - if (!context.IsEmpty()) { - context->Enter(); - } - // Set the peer object for future access. // InstantiateV8Object automatically casts node to Peerable*. v8::Local<v8::Object> result = InstantiateV8Object(type, V8ClassIndex::NODE, node); - - // Exit the node's context if it was entered. - if (!context.IsEmpty()) { - context->Exit(); - } - if (result.IsEmpty()) { // If instantiation failed it's important not to add the result // to the DOM node map. Instead we return an empty handle, which |