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

Side by Side Diff: third_party/WebKit/Source/platform/bindings/ScriptWrappable.cpp

Issue 2843603002: Move ScriptWrappable and dependencies to platform/bindings (Closed)
Patch Set: Rebase and try again Created 3 years, 7 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
OLDNEW
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 "platform/bindings/ScriptWrappable.h"
6 6
7 #include "bindings/core/v8/DOMDataStore.h" 7 #include "platform/bindings/DOMDataStore.h"
8 #include "bindings/core/v8/ScriptWrappableVisitor.h" 8 #include "platform/bindings/ScriptWrappableVisitor.h"
9 #include "bindings/core/v8/V8DOMWrapper.h" 9 #include "platform/bindings/V8DOMWrapper.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 struct SameSizeAsScriptWrappable { 13 struct SameSizeAsScriptWrappable {
14 virtual ~SameSizeAsScriptWrappable() {} 14 virtual ~SameSizeAsScriptWrappable() {}
15 v8::Persistent<v8::Object> main_world_wrapper_; 15 v8::Persistent<v8::Object> main_world_wrapper_;
16 }; 16 };
17 17
18 static_assert(sizeof(ScriptWrappable) <= sizeof(SameSizeAsScriptWrappable), 18 static_assert(sizeof(ScriptWrappable) <= sizeof(SameSizeAsScriptWrappable),
19 "ScriptWrappable should stay small"); 19 "ScriptWrappable should stay small");
(...skipping 18 matching lines...) Expand all
38 return V8DOMWrapper::AssociateObjectWithWrapper(isolate, this, 38 return V8DOMWrapper::AssociateObjectWithWrapper(isolate, this,
39 wrapper_type_info, wrapper); 39 wrapper_type_info, wrapper);
40 } 40 }
41 41
42 void ScriptWrappable::MarkWrapper(const WrapperVisitor* visitor) const { 42 void ScriptWrappable::MarkWrapper(const WrapperVisitor* visitor) const {
43 if (ContainsWrapper()) 43 if (ContainsWrapper())
44 visitor->MarkWrapper(&main_world_wrapper_.As<v8::Value>()); 44 visitor->MarkWrapper(&main_world_wrapper_.As<v8::Value>());
45 } 45 }
46 46
47 } // namespace blink 47 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698