Index: third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h |
diff --git a/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h b/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h |
index ce9429af5f18e46aa00d47c8adf59acfb08be70a..a11882d8317d412a44148470a11604ce4e8bc4c5 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h |
+++ b/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h |
@@ -135,11 +135,11 @@ struct WrapperTypeInfo { |
return domTemplateFunction(isolate, world); |
} |
- void wrapperCreated() const { |
+ static void wrapperCreated() { |
ThreadState::current()->heap().heapStats().increaseWrapperCount(1); |
} |
- void wrapperDestroyed() const { |
+ static void wrapperDestroyed() { |
ThreadHeapStats& heapStats = ThreadState::current()->heap().heapStats(); |
heapStats.decreaseWrapperCount(1); |
heapStats.increaseCollectedWrapperCount(1); |
@@ -206,6 +206,8 @@ inline T* getInternalField(v8::Local<v8::Object> wrapper) { |
wrapper->GetAlignedPointerFromInternalField(offset)); |
} |
+// The return value can be null if |wrapper| is a global proxy object, which |
+// points to nothing while a navigation. |
inline ScriptWrappable* toScriptWrappable( |
const v8::PersistentBase<v8::Object>& wrapper) { |
return getInternalField<ScriptWrappable, v8DOMWrapperObjectIndex>(wrapper); |