WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-96637-20120930115219.patch (text/plain), 23.38 KB, created by
Dan Carney
on 2012-09-30 08:53:05 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dan Carney
Created:
2012-09-30 08:53:05 PDT
Size:
23.38 KB
patch
obsolete
>Subversion Revision: 129992 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3adfab3d01e5b2b19588440af74e5516ff194464..25087ab82e5dcdc8ee8213dc5f89f8193dfbfd49 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,60 @@ >+2012-09-30 Dan Carney <dcarney@google.com> >+ >+ Remove V8DOMWindowShell::getEntered >+ https://bugs.webkit.org/show_bug.cgi?id=96637 >+ >+ Reviewed by Adam Barth. >+ >+ V8DOMWindowShell::getEntered was refactored so that the window shell >+ no longer has to be kept alive by a v8 context but rather a smaller >+ object. >+ >+ No new tests. No change in functionality. >+ >+ * bindings/v8/DOMData.cpp: >+ (WebCore::DOMData::getCurrentStore): >+ * bindings/v8/ScopedPersistent.h: >+ (WebCore::ScopedPersistent::leakHandle): >+ (ScopedPersistent): >+ * bindings/v8/ScriptController.cpp: >+ (WebCore::ScriptController::resetIsolatedWorlds): >+ (WebCore::ScriptController::evaluateInIsolatedWorld): >+ (WebCore::ScriptController::currentWorldContext): >+ * bindings/v8/V8Binding.cpp: >+ (WebCore::perContextDataForCurrentWorld): >+ * bindings/v8/V8DOMWindowShell.cpp: >+ (WebCore::setIsolatedWorldField): >+ (WebCore::V8DOMWindowShell::toIsolatedContextData): >+ (WebCore::isolatedContextWeakCallback): >+ (WebCore::V8DOMWindowShell::disposeContext): >+ (WebCore::V8DOMWindowShell::clearIsolatedShell): >+ (WebCore): >+ (WebCore::V8DOMWindowShell::initializeIfNeeded): >+ (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin): >+ * bindings/v8/V8DOMWindowShell.h: >+ (V8DOMWindowShell): >+ (IsolatedContextData): >+ (WebCore::V8DOMWindowShell::IsolatedContextData::create): >+ (WebCore::V8DOMWindowShell::IsolatedContextData::world): >+ (WebCore::V8DOMWindowShell::IsolatedContextData::perContextData): >+ (WebCore::V8DOMWindowShell::IsolatedContextData::setSecurityOrigin): >+ (WebCore::V8DOMWindowShell::IsolatedContextData::securityOrigin): >+ (WebCore::V8DOMWindowShell::IsolatedContextData::IsolatedContextData): >+ (WebCore::V8DOMWindowShell::enteredIsolatedContext): >+ (WebCore::V8DOMWindowShell::enteredIsolatedContextData): >+ * bindings/v8/V8DOMWrapper.h: >+ (WebCore::V8DOMWrapper::getCachedWrapper): >+ * bindings/v8/WorldContextHandle.cpp: >+ (WebCore::WorldContextHandle::WorldContextHandle): >+ * bindings/v8/custom/V8DocumentCustom.cpp: >+ (WebCore::toV8): >+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp: >+ (WebCore::toV8): >+ * bindings/v8/custom/V8SVGDocumentCustom.cpp: >+ (WebCore::toV8): >+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: >+ (WebCore::V8XMLHttpRequest::constructorCallback): >+ > 2012-09-29 Dongwoo Joshua Im <dw.im@samsung.com> > > AsyncFileSystem::openFileSystem should have FileSystemType as a parameter. >diff --git a/Source/WebCore/bindings/v8/DOMData.cpp b/Source/WebCore/bindings/v8/DOMData.cpp >index af50a1eca3ab21581abd64aa00ff5af338cbb97d..7cc24bc3861b6ab28dc43a6cc468870974922841 100644 >--- a/Source/WebCore/bindings/v8/DOMData.cpp >+++ b/Source/WebCore/bindings/v8/DOMData.cpp >@@ -43,9 +43,9 @@ DOMDataStore& DOMData::getCurrentStore(v8::Isolate* isolate) > V8PerIsolateData* data = V8PerIsolateData::current(isolate); > if (UNLIKELY(data->domDataStore() != 0)) > return *data->domDataStore(); >- V8DOMWindowShell* context = V8DOMWindowShell::getEntered(); >- if (UNLIKELY(context != 0)) >- return *context->world()->domDataStore(); >+ V8DOMWindowShell::IsolatedContextData* isolatedData = V8DOMWindowShell::enteredIsolatedContextData(); >+ if (UNLIKELY(!!isolatedData)) >+ return *isolatedData->world()->domDataStore(); > return defaultStore; > } > >diff --git a/Source/WebCore/bindings/v8/ScopedPersistent.h b/Source/WebCore/bindings/v8/ScopedPersistent.h >index fccf4aa59b889c9e21666918be64ff66de05e141..8a685f974b2c8d767cc5d49ac5781935c985af4e 100644 >--- a/Source/WebCore/bindings/v8/ScopedPersistent.h >+++ b/Source/WebCore/bindings/v8/ScopedPersistent.h >@@ -78,6 +78,13 @@ public: > m_handle.Clear(); > } > >+ v8::Persistent<T> leakHandle() >+ { >+ v8::Persistent<T> handle = m_handle; >+ m_handle.Clear(); >+ return handle; >+ } >+ > private: > v8::Persistent<T> m_handle; > }; >diff --git a/Source/WebCore/bindings/v8/ScriptController.cpp b/Source/WebCore/bindings/v8/ScriptController.cpp >index 4800ade914e20218ce9bf387ab1ed7af52995fe9..91f305e7777f12c8b9e14664259380accbe1cbe8 100644 >--- a/Source/WebCore/bindings/v8/ScriptController.cpp >+++ b/Source/WebCore/bindings/v8/ScriptController.cpp >@@ -146,7 +146,8 @@ void ScriptController::resetIsolatedWorlds() > { > for (IsolatedWorldMap::iterator iter = m_isolatedWorlds.begin(); > iter != m_isolatedWorlds.end(); ++iter) { >- iter->second->destroyIsolatedShell(); >+ iter->second->clearIsolatedShell(); >+ delete iter->second; > } > m_isolatedWorlds.clear(); > m_isolatedWorldSecurityOrigins.clear(); >@@ -390,11 +391,12 @@ void ScriptController::evaluateInIsolatedWorld(int worldID, const Vector<ScriptS > resultArray->Set(i, evaluationResult); > } > >- // Mark temporary shell for weak destruction. >+ // Destroy temporary world. > if (worldID == DOMWrapperWorld::uninitializedWorldId) { > int actualWorldId = isolatedWorldShell->world()->worldId(); > m_isolatedWorlds.remove(actualWorldId); >- isolatedWorldShell->destroyIsolatedShell(); >+ isolatedWorldShell->clearIsolatedShell(); >+ delete isolatedWorldShell; > } > > v8Results = evaluateHandleScope.Close(resultArray); >@@ -429,11 +431,20 @@ void ScriptController::finishedWithEvent(Event* event) > > v8::Local<v8::Context> ScriptController::currentWorldContext() > { >- if (V8DOMWindowShell* isolatedShell = V8DOMWindowShell::getEntered()) { >- v8::Persistent<v8::Context> context = isolatedShell->context(); >- if (context.IsEmpty() || m_frame != toFrameIfNotDetached(context)) >+ V8DOMWindowShell::IsolatedContextData* isolatedContextData = V8DOMWindowShell::enteredIsolatedContextData(); >+ if (UNLIKELY(!!isolatedContextData)) { >+ V8DOMWindowShell* isolatedShell = existingWindowShellInternal(isolatedContextData->world()); >+ // A temporary isolated world has been deleted, so use the current context. >+ if (UNLIKELY(!isolatedShell)) { >+ v8::Handle<v8::Context> context = v8::Context::GetEntered(); >+ if (m_frame != toFrameIfNotDetached(context)) >+ return v8::Local<v8::Context>(); >+ return v8::Local<v8::Context>::New(context); >+ } >+ // The shell exists, but potentially it has a new context, so use it. >+ if (isolatedShell->context().IsEmpty() || m_frame != toFrameIfNotDetached(isolatedShell->context())) > return v8::Local<v8::Context>(); >- return v8::Local<v8::Context>::New(context); >+ return v8::Local<v8::Context>::New(isolatedShell->context()); > } > windowShell()->initializeIfNeeded(); > return v8::Local<v8::Context>::New(windowShell()->context()); >diff --git a/Source/WebCore/bindings/v8/V8Binding.cpp b/Source/WebCore/bindings/v8/V8Binding.cpp >index d22e775075d392e7c47ae2329db0e7035bb36ef3..6aeab41aaf2585daeb73525a64289a954d7fa717 100644 >--- a/Source/WebCore/bindings/v8/V8Binding.cpp >+++ b/Source/WebCore/bindings/v8/V8Binding.cpp >@@ -311,9 +311,9 @@ v8::Local<v8::Context> toV8Context(ScriptExecutionContext* context, const WorldC > > V8PerContextData* perContextDataForCurrentWorld(Frame* frame) > { >- V8DOMWindowShell* isolatedShell; >- if (UNLIKELY(!!(isolatedShell = V8DOMWindowShell::getEntered()))) >- return isolatedShell->perContextData(); >+ V8DOMWindowShell::IsolatedContextData* isolatedShellData = 0; >+ if (UNLIKELY(!!(isolatedShellData = V8DOMWindowShell::enteredIsolatedContextData()))) >+ return isolatedShellData->perContextData(); > return frame->script()->windowShell()->perContextData(); > } > >diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp >index 81ea21a3b8ed54f3a7ae6275067cf22ad2c68b48..759662e0094587d35c123703e42873cf10ef3bd8 100644 >--- a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp >+++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp >@@ -170,14 +170,16 @@ static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* docum > ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::Object>::Cast(wrapper->GetPrototype())) == document)); > } > >-static void setIsolatedWorldField(V8DOMWindowShell* shell, v8::Local<v8::Context> context) >+static void setIsolatedWorldField(V8DOMWindowShell::IsolatedContextData* data, v8::Handle<v8::Context> context) > { >- toInnerGlobalObject(context)->SetPointerInInternalField(V8DOMWindow::enteredIsolatedWorldIndex, shell); >+ toInnerGlobalObject(context)->SetPointerInInternalField(V8DOMWindow::enteredIsolatedWorldIndex, data); > } > >-V8DOMWindowShell* V8DOMWindowShell::enteredIsolatedWorldContext() >+V8DOMWindowShell::IsolatedContextData* V8DOMWindowShell::toIsolatedContextData(v8::Handle<v8::Object> innerGlobal) > { >- return static_cast<V8DOMWindowShell*>(toInnerGlobalObject(v8::Context::GetEntered())->GetPointerFromInternalField(V8DOMWindow::enteredIsolatedWorldIndex)); >+ if (innerGlobal->InternalFieldCount() < V8DOMWindow::enteredIsolatedWorldIndex) >+ return 0; >+ return static_cast<IsolatedContextData*>(innerGlobal->GetPointerFromInternalField(V8DOMWindow::enteredIsolatedWorldIndex)); > } > > static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext, int debugId) >@@ -207,20 +209,14 @@ bool V8DOMWindowShell::isContextInitialized() > return !m_context.isEmpty(); > } > >-void V8DOMWindowShell::destroyIsolatedShell() >-{ >- disposeContext(true); >-} >- > static void isolatedContextWeakCallback(v8::Persistent<v8::Value> object, void* parameter) > { >- // Handle will be disposed in delete. >- delete static_cast<V8DOMWindowShell*>(parameter); >+ object.Dispose(); >+ delete static_cast<V8DOMWindowShell::IsolatedContextData*>(parameter); > } > >-void V8DOMWindowShell::disposeContext(bool weak) >+void V8DOMWindowShell::disposeContext() > { >- ASSERT(!m_context.get().IsWeak()); > m_perContextData.clear(); > > if (m_context.isEmpty()) >@@ -228,14 +224,14 @@ void V8DOMWindowShell::disposeContext(bool weak) > > m_frame->loader()->client()->willReleaseScriptContext(m_context.get(), m_world->worldId()); > >- if (!weak) >- m_context.clear(); >- else { >+ if (m_isolatedContextData) { > ASSERT(!m_world->isMainWorld()); >- destroyGlobal(); >- m_frame = 0; >- m_context.get().MakeWeak(this, isolatedContextWeakCallback); >- } >+ // Here we must intentionally leak the per context data pointer as it gets deleted in isolatedContextWeakCallback. >+ m_context.leakHandle().MakeWeak(m_isolatedContextData.leakPtr(), isolatedContextWeakCallback); >+ // The global handle keeps a reference to the context, so it must be removed. >+ m_global.clear(); >+ } else >+ m_context.clear(); > > // It's likely that disposing the context has created a lot of > // garbage. Notify V8 about this so it'll have a chance of cleaning >@@ -251,6 +247,11 @@ void V8DOMWindowShell::destroyGlobal() > m_global.clear(); > } > >+void V8DOMWindowShell::clearIsolatedShell() >+{ >+ disposeContext(); >+} >+ > void V8DOMWindowShell::clearForClose() > { > if (m_context.isEmpty()) >@@ -345,19 +346,20 @@ bool V8DOMWindowShell::initializeIfNeeded() > } > } > >+ m_perContextData = V8PerContextData::create(m_context.get()); >+ if (!m_perContextData->init()) { >+ disposeContext(); >+ return false; >+ } >+ > // Flag context as isolated. > if (!isMainWorld) { > V8DOMWindowShell* mainWindow = m_frame->script()->windowShell(); > mainWindow->initializeIfNeeded(); > if (!mainWindow->context().IsEmpty()) > setInjectedScriptContextDebugId(m_context.get(), m_frame->script()->contextDebugId(mainWindow->context())); >- setIsolatedWorldField(this, context); >- } >- >- m_perContextData = V8PerContextData::create(m_context.get()); >- if (!m_perContextData->init()) { >- disposeContext(); >- return false; >+ m_isolatedContextData = IsolatedContextData::create(m_world, m_perContextData.release(), m_isolatedWorldShellSecurityOrigin); >+ setIsolatedWorldField(m_isolatedContextData.get(), context); > } > > if (!installDOMWindow()) { >@@ -617,6 +619,8 @@ void V8DOMWindowShell::setIsolatedWorldSecurityOrigin(PassRefPtr<SecurityOrigin> > InspectorInstrumentation::didCreateIsolatedContext(m_frame, scriptState, securityOrigin.get()); > } > m_isolatedWorldShellSecurityOrigin = securityOrigin; >+ if (m_isolatedContextData) >+ m_isolatedContextData->setSecurityOrigin(m_isolatedWorldShellSecurityOrigin); > } > > } // WebCore >diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.h b/Source/WebCore/bindings/v8/V8DOMWindowShell.h >index 01d29817fc8d321cb14a18e08638e4322ad69dd8..de2c2a20d8e7f4eaac51e4fd47b09077d3ed578e 100644 >--- a/Source/WebCore/bindings/v8/V8DOMWindowShell.h >+++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.h >@@ -53,6 +53,34 @@ class HTMLDocument; > // persist between navigations. > class V8DOMWindowShell { > public: >+ >+ // This class holds all the data that is accessible from a context for an isolated shell. >+ // It survives until the context is deleted. >+ class IsolatedContextData { >+ WTF_MAKE_NONCOPYABLE(IsolatedContextData); >+ public: >+ static PassOwnPtr<IsolatedContextData> create(PassRefPtr<DOMWrapperWorld> world, PassOwnPtr<V8PerContextData> perContextData, PassRefPtr<SecurityOrigin> securityOrigin) >+ { >+ return adoptPtr(new IsolatedContextData(world, perContextData, securityOrigin)); >+ } >+ DOMWrapperWorld* world() { return m_world.get(); } >+ V8PerContextData* perContextData() { return m_perContextData.get(); } >+ void setSecurityOrigin(PassRefPtr<SecurityOrigin> origin) { m_securityOrigin = origin; } >+ SecurityOrigin* securityOrigin() { return m_securityOrigin.get(); } >+ >+ private: >+ IsolatedContextData(PassRefPtr<DOMWrapperWorld> world, PassOwnPtr<V8PerContextData> perContextData, PassRefPtr<SecurityOrigin> securityOrigin) >+ : m_world(world) >+ , m_perContextData(perContextData) >+ , m_securityOrigin(securityOrigin) >+ { >+ } >+ >+ RefPtr<DOMWrapperWorld> m_world; >+ OwnPtr<V8PerContextData> m_perContextData; >+ RefPtr<SecurityOrigin> m_securityOrigin; >+ }; >+ > static PassOwnPtr<V8DOMWindowShell> create(Frame*, PassRefPtr<DOMWrapperWorld>); > > v8::Persistent<v8::Context> context() const { return m_context.get(); } >@@ -76,6 +104,7 @@ public: > > void clearForNavigation(); > void clearForClose(); >+ void clearIsolatedShell(); > > void destroyGlobal(); > >@@ -90,29 +119,25 @@ public: > return m_isolatedWorldShellSecurityOrigin.get(); > }; > >- // Returns the isolated world associated with >- // v8::Context::GetEntered(). Because worlds are isolated, the entire >- // JavaScript call stack should be from the same isolated world. >- // Returns 0 if the entered context is from the main world. >- // >- // FIXME: Consider edge cases with DOM mutation events that might >- // violate this invariant. >- // >- // FIXME: This is poorly named after the deletion of isolated contexts. >- static V8DOMWindowShell* getEntered() >+ inline static IsolatedContextData* enteredIsolatedContextData() > { >- if (!DOMWrapperWorld::isolatedWorldsExist()) >+ if (LIKELY(!DOMWrapperWorld::isolatedWorldsExist())) > return 0; > if (!v8::Context::InContext()) > return 0; >- return enteredIsolatedWorldContext(); >+ v8::Handle<v8::Object> innerGlobal = v8::Handle<v8::Object>::Cast(v8::Context::GetEntered()->Global()->GetPrototype()); >+ IsolatedContextData* isolatedContextData = toIsolatedContextData(innerGlobal); >+ if (LIKELY(!isolatedContextData)) >+ return 0; >+ return isolatedContextData; > } > >- void destroyIsolatedShell(); >+ static IsolatedContextData* toIsolatedContextData(v8::Handle<v8::Object> innerGlobal); >+ > private: > V8DOMWindowShell(Frame*, PassRefPtr<DOMWrapperWorld>); > >- void disposeContext(bool weak = false); >+ void disposeContext(); > > void setSecurityToken(); > >@@ -126,12 +151,11 @@ private: > void createContext(); > bool installDOMWindow(); > >- static V8DOMWindowShell* enteredIsolatedWorldContext(); >- > Frame* m_frame; > RefPtr<DOMWrapperWorld> m_world; > > OwnPtr<V8PerContextData> m_perContextData; >+ OwnPtr<IsolatedContextData> m_isolatedContextData; > > ScopedPersistent<v8::Context> m_context; > ScopedPersistent<v8::Object> m_global; >diff --git a/Source/WebCore/bindings/v8/V8DOMWrapper.h b/Source/WebCore/bindings/v8/V8DOMWrapper.h >index ad1bcafd9ce0dcc1e1ad17aa6ed61fc52bdb0310..c545a863d720538cd3e4e3b8d36dc559fc6fa70e 100644 >--- a/Source/WebCore/bindings/v8/V8DOMWrapper.h >+++ b/Source/WebCore/bindings/v8/V8DOMWrapper.h >@@ -118,14 +118,14 @@ namespace WebCore { > return *wrapper; > } > >- V8DOMWindowShell* context = V8DOMWindowShell::getEntered(); >- if (LIKELY(!context)) { >+ V8DOMWindowShell::IsolatedContextData* isolatedData = V8DOMWindowShell::enteredIsolatedContextData(); >+ if (LIKELY(!isolatedData)) { > v8::Persistent<v8::Object>* wrapper = node->wrapper(); > if (!wrapper) > return v8::Handle<v8::Object>(); > return *wrapper; > } >- DOMDataStore* store = context->world()->domDataStore(); >+ DOMDataStore* store = isolatedData->world()->domDataStore(); > DOMNodeMapping& domNodeMap = node->isActiveNode() ? store->activeDomNodeMap() : store->domNodeMap(); > return domNodeMap.get(node); > } >diff --git a/Source/WebCore/bindings/v8/WorldContextHandle.cpp b/Source/WebCore/bindings/v8/WorldContextHandle.cpp >index 34b9c19bf5980851f2f26b2fba3cb4e7382659f9..3199dfd9a052bda87bc9fadd714e2ba1973b87af 100644 >--- a/Source/WebCore/bindings/v8/WorldContextHandle.cpp >+++ b/Source/WebCore/bindings/v8/WorldContextHandle.cpp >@@ -44,27 +44,28 @@ WorldContextHandle::WorldContextHandle(WorldToUse worldToUse) > if (worldToUse == UseMainWorld || worldToUse == UseWorkerWorld) > return; > >+ if (!v8::Context::InContext()) { >+ m_worldToUse = UseMainWorld; >+ return; >+ } >+ >+ v8::Handle<v8::Context> context = v8::Context::GetCurrent(); >+ ASSERT(!context.IsEmpty()); >+ v8::Handle<v8::Object> innerGlobal = toInnerGlobalObject(context); > #if ENABLE(WORKERS) >- // FIXME We are duplicating a lot of effort here checking the context for the worker and for the isolated world. >- if (v8::Context::InContext()) { >- v8::Handle<v8::Context> context = v8::Context::GetCurrent(); >- if (!context.IsEmpty()) { >- if (UNLIKELY(!V8DOMWrapper::isWrapperOfType(toInnerGlobalObject(context), &V8DOMWindow::info))) { >- m_worldToUse = UseWorkerWorld; >- return; >- } >- } >+ if (UNLIKELY(!V8DOMWrapper::isWrapperOfType(innerGlobal, &V8DOMWindow::info))) { >+ m_worldToUse = UseWorkerWorld; >+ return; > } > #endif > >- V8DOMWindowShell* shell = V8DOMWindowShell::getEntered(); >- if (LIKELY(!shell)) { >+ V8DOMWindowShell::IsolatedContextData* data = V8DOMWindowShell::toIsolatedContextData(innerGlobal); >+ if (LIKELY(!data)) { > m_worldToUse = UseMainWorld; > return; > } > >- ASSERT(!shell->context().IsEmpty()); >- m_context = SharedPersistent<v8::Context>::create(shell->context()); >+ m_context = SharedPersistent<v8::Context>::create(context); > } > > v8::Local<v8::Context> WorldContextHandle::adjustedContext(ScriptController* script) const >diff --git a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp >index 81d2442abda5055aac54d0ac7563bcd7e676a04d..7c4a12691eaaa283eb0066783a30cb411ee935af 100644 >--- a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp >+++ b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp >@@ -108,7 +108,7 @@ v8::Handle<v8::Value> toV8(Document* impl, v8::Handle<v8::Object> creationContex > v8::Handle<v8::Object> wrapper = V8Document::wrap(impl, creationContext, isolate); > if (wrapper.IsEmpty()) > return wrapper; >- if (!V8DOMWindowShell::getEntered()) { >+ if (!V8DOMWindowShell::enteredIsolatedContextData()) { > if (Frame* frame = impl->frame()) > frame->script()->windowShell()->updateDocumentWrapper(wrapper); > } >diff --git a/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp >index 0d4719fa5a69bacd8194ab4eb7827cc7ed4be336..e9c810b154ea2e3d37fc0f6e488d6a3b81e13f41 100644 >--- a/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp >+++ b/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp >@@ -183,7 +183,7 @@ v8::Handle<v8::Value> toV8(HTMLDocument* impl, v8::Handle<v8::Object> creationCo > v8::Handle<v8::Object> wrapper = V8HTMLDocument::wrap(impl, creationContext, isolate); > if (wrapper.IsEmpty()) > return wrapper; >- if (!V8DOMWindowShell::getEntered()) { >+ if (!V8DOMWindowShell::enteredIsolatedContextData()) { > if (Frame* frame = impl->frame()) > frame->script()->windowShell()->updateDocumentWrapper(wrapper); > } >diff --git a/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp >index 0991dfc178096c76c7cb827aa0fbde325fc04253..e356a7a4bb1fa4e6de2bf2edfe43da649b2441ff 100644 >--- a/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp >+++ b/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp >@@ -45,7 +45,7 @@ v8::Handle<v8::Value> toV8(SVGDocument* impl, v8::Handle<v8::Object> creationCon > v8::Handle<v8::Object> wrapper = V8SVGDocument::wrap(impl, creationContext, isolate); > if (wrapper.IsEmpty()) > return wrapper; >- if (!V8DOMWindowShell::getEntered()) { >+ if (!V8DOMWindowShell::enteredIsolatedContextData()) { > if (Frame* frame = impl->frame()) > frame->script()->windowShell()->updateDocumentWrapper(wrapper); > } >diff --git a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp >index 050b7fb4d386a71f97cbea4a959e12baf7a7793b..e9485f91a06cc4abed0eda965f8ec6bc57f27aee 100644 >--- a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp >+++ b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp >@@ -55,8 +55,8 @@ v8::Handle<v8::Value> V8XMLHttpRequest::constructorCallback(const v8::Arguments& > ScriptExecutionContext* context = getScriptExecutionContext(); > > RefPtr<SecurityOrigin> securityOrigin; >- if (V8DOMWindowShell* isolatedWorldShell = V8DOMWindowShell::getEntered()) >- securityOrigin = isolatedWorldShell->isolatedWorldSecurityOrigin(); >+ if (V8DOMWindowShell::IsolatedContextData* isolatedContextData = V8DOMWindowShell::enteredIsolatedContextData()) >+ securityOrigin = isolatedContextData->securityOrigin(); > > RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, securityOrigin); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 96637
:
163847
|
164063
|
164227
|
164358
|
164371
|
166267
|
166330
|
166385
|
175227
|
175552
|
175757