| OLD | NEW |
| 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 #include "bindings/core/v8/ScriptModule.h" | 5 #include "bindings/core/v8/ScriptModule.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8Binding.h" | 7 #include "bindings/core/v8/V8BindingForCore.h" |
| 8 #include "core/dom/Modulator.h" | 8 #include "core/dom/Modulator.h" |
| 9 #include "core/dom/ScriptModuleResolver.h" | 9 #include "core/dom/ScriptModuleResolver.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 ScriptModule::ScriptModule(v8::Isolate* isolate, v8::Local<v8::Module> module) | 13 ScriptModule::ScriptModule(v8::Isolate* isolate, v8::Local<v8::Module> module) |
| 14 : module_(SharedPersistent<v8::Module>::Create(module, isolate)), | 14 : module_(SharedPersistent<v8::Module>::Create(module, isolate)), |
| 15 identity_hash_(static_cast<unsigned>(module->GetIdentityHash())) { | 15 identity_hash_(static_cast<unsigned>(module->GetIdentityHash())) { |
| 16 DCHECK(!module_->IsEmpty()); | 16 DCHECK(!module_->IsEmpty()); |
| 17 } | 17 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 if (resolved.IsNull()) { | 109 if (resolved.IsNull()) { |
| 110 DCHECK(exception_state.HadException()); | 110 DCHECK(exception_state.HadException()); |
| 111 return v8::MaybeLocal<v8::Module>(); | 111 return v8::MaybeLocal<v8::Module>(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 DCHECK(!exception_state.HadException()); | 114 DCHECK(!exception_state.HadException()); |
| 115 return v8::MaybeLocal<v8::Module>(resolved.module_->NewLocal(isolate)); | 115 return v8::MaybeLocal<v8::Module>(resolved.module_->NewLocal(isolate)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace blink | 118 } // namespace blink |
| OLD | NEW |