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

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

Issue 2617733004: binding: Changes the association among global-proxy/global/window-instance. (Closed)
Patch Set: Addressed review comments. Created 3 years, 10 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 0d099ccade7b45cb3ee7e2b38107e2ec856cc787..4c0255f49b756c312fa932cfbc2e30371ce90fff 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -468,7 +468,9 @@ void V8GCController::collectAllGarbageForTesting(v8::Isolate* isolate) {
class DOMWrapperTracer : public v8::PersistentHandleVisitor {
public:
- explicit DOMWrapperTracer(Visitor* visitor) : m_visitor(visitor) {}
+ explicit DOMWrapperTracer(Visitor* visitor) : m_visitor(visitor) {
+ DCHECK(m_visitor);
+ }
void VisitPersistentHandle(v8::Persistent<v8::Value>* value,
uint16_t classId) override {
@@ -479,8 +481,8 @@ class DOMWrapperTracer : public v8::PersistentHandleVisitor {
const v8::Persistent<v8::Object>& wrapper =
v8::Persistent<v8::Object>::Cast(*value);
- if (m_visitor)
- toWrapperTypeInfo(wrapper)->trace(m_visitor, toScriptWrappable(wrapper));
+ if (ScriptWrappable* scriptWrappable = toScriptWrappable(wrapper))
+ toWrapperTypeInfo(wrapper)->trace(m_visitor, scriptWrappable);
}
private:
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h ('k') | third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698