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 19745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19756 if (!callback(context, v8::Utils::ToLocal(specifier), | 19756 if (!callback(context, v8::Utils::ToLocal(specifier), |
19757 v8::Utils::ToLocal(module)) | 19757 v8::Utils::ToLocal(module)) |
19758 .ToLocal(&api_requested_module)) { | 19758 .ToLocal(&api_requested_module)) { |
19759 // TODO(adamk): Give this a better error message. But this is a | 19759 // TODO(adamk): Give this a better error message. But this is a |
19760 // misuse of the API anyway. | 19760 // misuse of the API anyway. |
19761 isolate->ThrowIllegalOperation(); | 19761 isolate->ThrowIllegalOperation(); |
19762 return false; | 19762 return false; |
19763 } | 19763 } |
19764 Handle<Module> requested_module = Utils::OpenHandle(*api_requested_module); | 19764 Handle<Module> requested_module = Utils::OpenHandle(*api_requested_module); |
19765 module->requested_modules()->set(i, *requested_module); | 19765 module->requested_modules()->set(i, *requested_module); |
| 19766 if (isolate->debug()->is_active()) { |
| 19767 isolate->debug()->OnModuleRequested(module, requested_module, specifier); |
| 19768 } |
19766 if (!Instantiate(requested_module, context, callback)) { | 19769 if (!Instantiate(requested_module, context, callback)) { |
19767 return false; | 19770 return false; |
19768 } | 19771 } |
19769 } | 19772 } |
19770 | 19773 |
19771 Zone zone(isolate->allocator(), ZONE_NAME); | 19774 Zone zone(isolate->allocator(), ZONE_NAME); |
19772 | 19775 |
19773 // Resolve imports. | 19776 // Resolve imports. |
19774 Handle<FixedArray> regular_imports(module_info->regular_imports(), isolate); | 19777 Handle<FixedArray> regular_imports(module_info->regular_imports(), isolate); |
19775 for (int i = 0, n = regular_imports->length(); i < n; ++i) { | 19778 for (int i = 0, n = regular_imports->length(); i < n; ++i) { |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20025 // depend on this. | 20028 // depend on this. |
20026 return DICTIONARY_ELEMENTS; | 20029 return DICTIONARY_ELEMENTS; |
20027 } | 20030 } |
20028 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20031 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20029 return kind; | 20032 return kind; |
20030 } | 20033 } |
20031 } | 20034 } |
20032 | 20035 |
20033 } // namespace internal | 20036 } // namespace internal |
20034 } // namespace v8 | 20037 } // namespace v8 |
OLD | NEW |