Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ScriptModuleResolver_h | |
| 6 #define ScriptModuleResolver_h | |
| 7 | |
| 8 #include "platform/heap/Handle.h" | |
| 9 #include "wtf/text/WTFString.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class ScriptModule; | |
| 14 class ScriptModuleIdentifier; | |
| 15 class ModuleScript; | |
| 16 | |
| 17 // The ScriptModuleResolver interface is used from V8 module bindings | |
|
dominicc (has gone to gerrit)
2017/01/11 03:23:47
Hmm, not sure about this comment. This is an inter
kouhei (in TOK)
2017/01/17 05:26:13
Done.
| |
| 18 // to resolve script module descendents references stored in core/dom module | |
| 19 // implementation. | |
| 20 class ScriptModuleResolver : public GarbageCollected<ScriptModuleResolver> { | |
|
haraken
2017/01/11 02:31:28
I'm not sure if this should be in bindings/ or cor
kouhei (in TOK)
2017/01/17 05:26:13
Done.
| |
| 21 public: | |
| 22 DEFINE_INLINE_VIRTUAL_TRACE() {} | |
| 23 | |
| 24 // Called from ModuleMap to observe all fetched ModuleScript instances which | |
|
dominicc (has gone to gerrit)
2017/01/11 03:23:47
Maybe rephrase this, it sounds like ModuleMap is d
kouhei (in TOK)
2017/01/17 05:26:13
Done.
| |
| 25 // might be specified as a referrer. | |
| 26 virtual void registerModuleScript(ModuleScript*) = 0; | |
| 27 | |
| 28 // Implements "Runtime Semantics: HostResolveImportedModule" | |
| 29 // https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule | |
| 30 virtual ScriptModule resolve(const String& specifier, | |
|
dominicc (has gone to gerrit)
2017/01/11 03:23:47
Maybe briefly mention this may return an empty Scr
kouhei (in TOK)
2017/01/17 05:26:13
Done.
| |
| 31 ScriptModuleIdentifier referrer) = 0; | |
| 32 }; | |
| 33 | |
| 34 } // namespace blink | |
| 35 | |
| 36 #endif // ScriptModuleResolver_h | |
| OLD | NEW |