Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bindings/core/v8/ScriptWrappable.h" | 5 #include "bindings/core/v8/ScriptWrappable.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/DOMDataStore.h" | 7 #include "bindings/core/v8/DOMDataStore.h" |
| 8 #include "bindings/core/v8/ScriptWrappableHeapTracer.h" | |
| 8 #include "bindings/core/v8/V8DOMWrapper.h" | 9 #include "bindings/core/v8/V8DOMWrapper.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 struct SameSizeAsScriptWrappable { | 13 struct SameSizeAsScriptWrappable { |
| 13 virtual ~SameSizeAsScriptWrappable() { } | 14 virtual ~SameSizeAsScriptWrappable() { } |
| 14 v8::Persistent<v8::Object> m_wrapper; | 15 v8::Persistent<v8::Object> m_wrapper; |
| 15 }; | 16 }; |
| 16 | 17 |
| 17 static_assert(sizeof(ScriptWrappable) <= sizeof(SameSizeAsScriptWrappable), "Scr iptWrappable should stay small"); | 18 static_assert(sizeof(ScriptWrappable) <= sizeof(SameSizeAsScriptWrappable), "Scr iptWrappable should stay small"); |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 28 | 29 |
| 29 wrapperTypeInfo->installConditionallyEnabledProperties(wrapper, isolate); | 30 wrapperTypeInfo->installConditionallyEnabledProperties(wrapper, isolate); |
| 30 return associateWithWrapper(isolate, wrapperTypeInfo, wrapper); | 31 return associateWithWrapper(isolate, wrapperTypeInfo, wrapper); |
| 31 } | 32 } |
| 32 | 33 |
| 33 v8::Local<v8::Object> ScriptWrappable::associateWithWrapper(v8::Isolate* isolate , const WrapperTypeInfo* wrapperTypeInfo, v8::Local<v8::Object> wrapper) | 34 v8::Local<v8::Object> ScriptWrappable::associateWithWrapper(v8::Isolate* isolate , const WrapperTypeInfo* wrapperTypeInfo, v8::Local<v8::Object> wrapper) |
| 34 { | 35 { |
| 35 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTypeIn fo, wrapper); | 36 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTypeIn fo, wrapper); |
| 36 } | 37 } |
| 37 | 38 |
| 39 void ScriptWrappable::markWrapper(v8::Isolate* isolate) const | |
|
haraken
2016/04/18 04:35:41
This method looks redundant. The caller sites of t
Marcel Hlopko
2016/04/18 11:45:35
I agree, in this form the method is useless. I cha
| |
| 40 { | |
| 41 ScriptWrappableHeapTracer::markWrapper(this, isolate); | |
| 42 } | |
| 43 | |
| 38 } // namespace blink | 44 } // namespace blink |
| OLD | NEW |