Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index ca3c8f89b7c5bbac73d62cd5e3c597b1f41c258b..8df564eddd5008c752a37159152a9ca10cae41f2 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -7962,11 +7962,17 @@ class Module : public Struct { |
| static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name, |
| int module_request); |
| + // The [must_resolve] argument indicates whether or not an exception should be |
| + // thrown if the module does not provide an export named [name]. |
| + // Currently, an exception is always thrown in the case of a cycle and in the |
| + // case of conflicting star exports. TODO(neis): Make that spec-compliant. |
| + static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport(Handle<Module> module, |
| + Handle<String> name, |
| + bool must_resolve); |
| static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport(Handle<Module> module, |
| Handle<String> name, |
| - int module_request); |
| - static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport(Handle<Module> module, |
| - Handle<String> name); |
| + int module_request, |
| + bool must_resolve); |
| static const int kCodeOffset = HeapObject::kHeaderSize; |
| static const int kExportsOffset = kCodeOffset + kPointerSize; |
| @@ -7978,6 +7984,10 @@ class Module : public Struct { |
| private: |
| enum { kEvaluatedBit }; |
| + // Helper for ResolveExport. |
|
adamk
2016/09/24 01:01:00
Please document the fact that you have to check th
|
| + static MUST_USE_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports( |
| + Handle<Module> module, Handle<String> name, bool must_resolve); |
| + |
| DISALLOW_IMPLICIT_CONSTRUCTORS(Module); |
| }; |