| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ActiveScriptWrappable.h" | 5 #include "platform/bindings/ActiveScriptWrappable.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/DOMDataStore.h" | 7 #include "platform/bindings/DOMDataStore.h" |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "platform/bindings/ScriptWrappable.h" |
| 9 #include "bindings/core/v8/ScriptWrappableVisitor.h" | 9 #include "platform/bindings/ScriptWrappableVisitor.h" |
| 10 #include "bindings/core/v8/V8Binding.h" | 10 #include "platform/bindings/V8Binding.h" |
| 11 #include "bindings/core/v8/V8PerIsolateData.h" | 11 #include "platform/bindings/V8PerIsolateData.h" |
| 12 #include "core/dom/ExecutionContext.h" | |
| 13 | 12 |
| 14 namespace blink { | 13 namespace blink { |
| 15 | 14 |
| 16 ActiveScriptWrappableBase::ActiveScriptWrappableBase() { | 15 ActiveScriptWrappableBase::ActiveScriptWrappableBase() { |
| 17 DCHECK(ThreadState::Current()); | 16 DCHECK(ThreadState::Current()); |
| 18 v8::Isolate* isolate = ThreadState::Current()->GetIsolate(); | 17 v8::Isolate* isolate = ThreadState::Current()->GetIsolate(); |
| 19 V8PerIsolateData* isolate_data = V8PerIsolateData::From(isolate); | 18 V8PerIsolateData* isolate_data = V8PerIsolateData::From(isolate); |
| 20 isolate_data->AddActiveScriptWrappable(this); | 19 isolate_data->AddActiveScriptWrappable(this); |
| 21 } | 20 } |
| 22 | 21 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 auto script_wrappable = | 53 auto script_wrappable = |
| 55 active_wrappable->ToScriptWrappable(active_wrappable); | 54 active_wrappable->ToScriptWrappable(active_wrappable); |
| 56 auto wrapper_type_info = | 55 auto wrapper_type_info = |
| 57 const_cast<WrapperTypeInfo*>(script_wrappable->GetWrapperTypeInfo()); | 56 const_cast<WrapperTypeInfo*>(script_wrappable->GetWrapperTypeInfo()); |
| 58 visitor->RegisterV8Reference( | 57 visitor->RegisterV8Reference( |
| 59 std::make_pair(wrapper_type_info, script_wrappable)); | 58 std::make_pair(wrapper_type_info, script_wrappable)); |
| 60 } | 59 } |
| 61 } | 60 } |
| 62 | 61 |
| 63 } // namespace blink | 62 } // namespace blink |
| OLD | NEW |