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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: fixed dcheck build error 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "bindings/core/v8/ActiveScriptWrappable.h"
6 6
7 #include "bindings/core/v8/DOMDataStore.h" 7 #include "bindings/core/v8/DOMDataStore.h"
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/core/v8/ScriptWrappableVisitor.h" 9 #include "bindings/core/v8/ScriptWrappableVisitor.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
11 #include "bindings/core/v8/V8PerIsolateData.h" 11 #include "bindings/core/v8/V8PerIsolateData.h"
12 #include "core/dom/ExecutionContext.h" 12 #include "core/dom/ExecutionContext.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 ActiveScriptWrappableBase::ActiveScriptWrappableBase() { 16 ActiveScriptWrappableBase::ActiveScriptWrappableBase() {
17 ASSERT(ThreadState::Current()); 17 DCHECK(ThreadState::Current());
18 v8::Isolate* isolate = ThreadState::Current()->GetIsolate(); 18 v8::Isolate* isolate = ThreadState::Current()->GetIsolate();
19 V8PerIsolateData* isolate_data = V8PerIsolateData::From(isolate); 19 V8PerIsolateData* isolate_data = V8PerIsolateData::From(isolate);
20 isolate_data->AddActiveScriptWrappable(this); 20 isolate_data->AddActiveScriptWrappable(this);
21 } 21 }
22 22
23 void ActiveScriptWrappableBase::TraceActiveScriptWrappables( 23 void ActiveScriptWrappableBase::TraceActiveScriptWrappables(
24 v8::Isolate* isolate, 24 v8::Isolate* isolate,
25 ScriptWrappableVisitor* visitor) { 25 ScriptWrappableVisitor* visitor) {
26 V8PerIsolateData* isolate_data = V8PerIsolateData::From(isolate); 26 V8PerIsolateData* isolate_data = V8PerIsolateData::From(isolate);
27 auto active_script_wrappables = isolate_data->ActiveScriptWrappables(); 27 auto active_script_wrappables = isolate_data->ActiveScriptWrappables();
(...skipping 26 matching lines...) Expand all
54 auto script_wrappable = 54 auto script_wrappable =
55 active_wrappable->ToScriptWrappable(active_wrappable); 55 active_wrappable->ToScriptWrappable(active_wrappable);
56 auto wrapper_type_info = 56 auto wrapper_type_info =
57 const_cast<WrapperTypeInfo*>(script_wrappable->GetWrapperTypeInfo()); 57 const_cast<WrapperTypeInfo*>(script_wrappable->GetWrapperTypeInfo());
58 visitor->RegisterV8Reference( 58 visitor->RegisterV8Reference(
59 std::make_pair(wrapper_type_info, script_wrappable)); 59 std::make_pair(wrapper_type_info, script_wrappable));
60 } 60 }
61 } 61 }
62 62
63 } // namespace blink 63 } // namespace blink
OLDNEW
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698