Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h

Issue 2743653002: Make context initialization order deterministic in WebFrame::swap(). (Closed)
Patch Set: Add comment. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h b/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h
index f05f501ed29d34552f860647dd7446eedfb9b473..35f442746d7bc400437f211006ae807772a46650 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h
@@ -30,10 +30,13 @@ class WindowProxyManagerBase : public GarbageCollected<WindowProxyManagerBase> {
void clearForClose();
void CORE_EXPORT clearForNavigation();
- void CORE_EXPORT
- releaseGlobals(HashMap<DOMWrapperWorld*, v8::Local<v8::Object>>&);
- void CORE_EXPORT
- setGlobals(const HashMap<DOMWrapperWorld*, v8::Local<v8::Object>>&);
+ // Globals are passed in a vector to maintain their order: global object for
+ // the main world is always first. This is needed to prevent bugs like
+ // https://crbug.com/700077.
+ using GlobalsVector =
+ Vector<std::pair<DOMWrapperWorld*, v8::Local<v8::Object>>>;
+ void CORE_EXPORT releaseGlobals(GlobalsVector&);
+ void CORE_EXPORT setGlobals(const GlobalsVector&);
protected:
using IsolatedWorldMap = HeapHashMap<int, Member<WindowProxy>>;
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698