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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ToV8.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/ToV8.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ToV8.h b/third_party/WebKit/Source/bindings/core/v8/ToV8.h
index 76aa60c08e36ed2c455bc6b6f7b11c441519079b..012185924ed5fd4a2f0d47facdd24392c32bdb19 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ToV8.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ToV8.h
@@ -46,15 +46,7 @@ inline v8::Local<v8::Value> ToV8(ScriptWrappable* impl,
inline v8::Local<v8::Value> ToV8(Node* impl,
v8::Local<v8::Object> creationContext,
v8::Isolate* isolate) {
- if (UNLIKELY(!impl))
- return v8::Null(isolate);
- v8::Local<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
- if (!wrapper.IsEmpty())
- return wrapper;
-
- wrapper = ScriptWrappable::fromNode(impl)->wrap(isolate, creationContext);
- DCHECK(!wrapper.IsEmpty());
- return wrapper;
+ return ToV8(ScriptWrappable::fromNode(impl), creationContext, isolate);
}
// Special versions for DOMWindow and EventTarget
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698