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

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

Issue 2726593002: Use mayNotBeMainThread() for wrapper optimization (Closed)
Patch Set: Use V8TestingScope 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
Index: third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
index 4970d3eb581defda0a55c13184f2e83fd9c5ecb4..fa016a0520c313ce81bc4c0c4edefa97f843ffcd 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
@@ -67,7 +67,9 @@ class CORE_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
~DOMWrapperWorld();
void dispose();
- static bool isolatedWorldsExist() { return isolatedWorldCount; }
+ static bool nonMainWorldsInMainThread() {
+ return s_numberOfNonMainWorldsInMainThread;
+ }
static void allWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld>>& worlds);
static void markWrappersInAllWorlds(ScriptWrappable*,
const ScriptWrappableVisitor*);
@@ -127,7 +129,7 @@ class CORE_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
void registerDOMObjectHolderInternal(std::unique_ptr<DOMObjectHolderBase>);
void unregisterDOMObjectHolder(DOMObjectHolderBase*);
- static unsigned isolatedWorldCount;
+ static unsigned s_numberOfNonMainWorldsInMainThread;
const int m_worldId;
std::unique_ptr<DOMDataStore> m_domDataStore;

Powered by Google App Engine
This is Rietveld 408576698