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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp

Issue 2693893007: binding: Changes the association among global-proxy/global/window-instance (2nd attempt). (Closed)
Patch Set: Fixed a typo in DOMWrapperWorld::DissociateDOMWindowWrappersInAllWorlds. Created 3 years, 8 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/V8GCController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
index c5327dbd79ca9478ebadbe10e967243b086c98ef..c99753017e96c5c08abdb638301f17982f837229 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -472,7 +472,9 @@ void V8GCController::CollectAllGarbageForTesting(v8::Isolate* isolate) {
class DOMWrapperTracer : public v8::PersistentHandleVisitor {
public:
- explicit DOMWrapperTracer(Visitor* visitor) : visitor_(visitor) {}
+ explicit DOMWrapperTracer(Visitor* visitor) : visitor_(visitor) {
+ DCHECK(visitor_);
+ }
void VisitPersistentHandle(v8::Persistent<v8::Value>* value,
uint16_t class_id) override {
@@ -483,8 +485,8 @@ class DOMWrapperTracer : public v8::PersistentHandleVisitor {
const v8::Persistent<v8::Object>& wrapper =
v8::Persistent<v8::Object>::Cast(*value);
- if (visitor_)
- ToWrapperTypeInfo(wrapper)->Trace(visitor_, ToScriptWrappable(wrapper));
+ if (ScriptWrappable* script_wrappable = ToScriptWrappable(wrapper))
+ ToWrapperTypeInfo(wrapper)->Trace(visitor_, script_wrappable);
}
private:
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Binding.h ('k') | third_party/WebKit/Source/bindings/core/v8/WindowProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698