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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptModule.h

Issue 2821903002: [ES6 modules] Minor fixes to v8::ScriptModule (Closed)
Patch Set: actually setverbose 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef ScriptModule_h 5 #ifndef ScriptModule_h
6 #define ScriptModule_h 6 #define ScriptModule_h
7 7
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/SharedPersistent.h" 9 #include "bindings/core/v8/SharedPersistent.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 22 matching lines...) Expand all
33 AccessControlStatus); 33 AccessControlStatus);
34 34
35 // TODO(kouhei): Remove copy ctor 35 // TODO(kouhei): Remove copy ctor
36 ScriptModule() {} 36 ScriptModule() {}
37 ScriptModule(WTF::HashTableDeletedValueType) 37 ScriptModule(WTF::HashTableDeletedValueType)
38 : module_(WTF::kHashTableDeletedValue) {} 38 : module_(WTF::kHashTableDeletedValue) {}
39 ~ScriptModule(); 39 ~ScriptModule();
40 40
41 // Returns exception, if any. 41 // Returns exception, if any.
42 ScriptValue Instantiate(ScriptState*); 42 ScriptValue Instantiate(ScriptState*);
43 void Evaluate(ScriptState*); 43 void Evaluate(ScriptState*) const;
44 44
45 Vector<String> ModuleRequests(ScriptState*); 45 Vector<String> ModuleRequests(ScriptState*);
46 46
47 bool IsHashTableDeletedValue() const { 47 bool IsHashTableDeletedValue() const {
48 return module_.IsHashTableDeletedValue(); 48 return module_.IsHashTableDeletedValue();
49 } 49 }
50 50
51 bool operator==(const blink::ScriptModule& other) const { 51 bool operator==(const blink::ScriptModule& other) const {
52 if (IsHashTableDeletedValue() && other.IsHashTableDeletedValue()) 52 if (IsHashTableDeletedValue() && other.IsHashTableDeletedValue())
53 return true; 53 return true;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 using Hash = blink::ScriptModuleHash; 109 using Hash = blink::ScriptModuleHash;
110 }; 110 };
111 111
112 template <> 112 template <>
113 struct HashTraits<blink::ScriptModule> 113 struct HashTraits<blink::ScriptModule>
114 : public SimpleClassHashTraits<blink::ScriptModule> {}; 114 : public SimpleClassHashTraits<blink::ScriptModule> {};
115 115
116 } // namespace WTF 116 } // namespace WTF
117 117
118 #endif // ScriptModule_h 118 #endif // ScriptModule_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698