OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project 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 "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 19721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19732 if (!callback(context, v8::Utils::ToLocal(specifier), | 19732 if (!callback(context, v8::Utils::ToLocal(specifier), |
19733 v8::Utils::ToLocal(module)) | 19733 v8::Utils::ToLocal(module)) |
19734 .ToLocal(&api_requested_module)) { | 19734 .ToLocal(&api_requested_module)) { |
19735 // TODO(adamk): Give this a better error message. But this is a | 19735 // TODO(adamk): Give this a better error message. But this is a |
19736 // misuse of the API anyway. | 19736 // misuse of the API anyway. |
19737 isolate->ThrowIllegalOperation(); | 19737 isolate->ThrowIllegalOperation(); |
19738 return false; | 19738 return false; |
19739 } | 19739 } |
19740 Handle<Module> requested_module = Utils::OpenHandle(*api_requested_module); | 19740 Handle<Module> requested_module = Utils::OpenHandle(*api_requested_module); |
19741 module->requested_modules()->set(i, *requested_module); | 19741 module->requested_modules()->set(i, *requested_module); |
| 19742 if (isolate->debug()->is_active()) { |
| 19743 isolate->debug()->OnModuleResolved(module, requested_module, specifier); |
| 19744 } |
19742 if (!Instantiate(requested_module, context, callback)) { | 19745 if (!Instantiate(requested_module, context, callback)) { |
19743 return false; | 19746 return false; |
19744 } | 19747 } |
19745 } | 19748 } |
19746 | 19749 |
19747 Zone zone(isolate->allocator(), ZONE_NAME); | 19750 Zone zone(isolate->allocator(), ZONE_NAME); |
19748 | 19751 |
19749 // Resolve imports. | 19752 // Resolve imports. |
19750 Handle<FixedArray> regular_imports(module_info->regular_imports(), isolate); | 19753 Handle<FixedArray> regular_imports(module_info->regular_imports(), isolate); |
19751 for (int i = 0, n = regular_imports->length(); i < n; ++i) { | 19754 for (int i = 0, n = regular_imports->length(); i < n; ++i) { |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20001 // depend on this. | 20004 // depend on this. |
20002 return DICTIONARY_ELEMENTS; | 20005 return DICTIONARY_ELEMENTS; |
20003 } | 20006 } |
20004 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20007 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20005 return kind; | 20008 return kind; |
20006 } | 20009 } |
20007 } | 20010 } |
20008 | 20011 |
20009 } // namespace internal | 20012 } // namespace internal |
20010 } // namespace v8 | 20013 } // namespace v8 |
OLD | NEW |