| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 346 |
| 347 V8ScriptModule module; | 347 V8ScriptModule module; |
| 348 module.resourceName = document.url().string(); | 348 module.resourceName = document.url().string(); |
| 349 module.textPosition = textPosition; | 349 module.textPosition = textPosition; |
| 350 // FIXME: This should be the actual module object instead of the document. | 350 // FIXME: This should be the actual module object instead of the document. |
| 351 module.moduleObject = toV8(&document, context->Global(), m_isolate); | 351 module.moduleObject = toV8(&document, context->Global(), m_isolate); |
| 352 module.source = source; | 352 module.source = source; |
| 353 | 353 |
| 354 if (HTMLImport* parent = document.import()) { | 354 if (HTMLImport* parent = document.import()) { |
| 355 for (HTMLImport* child = parent->firstChild(); child; child = child->nex
t()) { | 355 for (HTMLImport* child = parent->firstChild(); child; child = child->nex
t()) { |
| 356 if (HTMLLinkElement* link = static_cast<HTMLImportChild*>(child)->li
nk()) { | 356 if (Element* link = static_cast<HTMLImportChild*>(child)->link()) { |
| 357 String name = link->as(); | 357 String name = link->getAttribute(HTMLNames::asAttr); |
| 358 if (!name.isEmpty()) { | 358 if (!name.isEmpty()) { |
| 359 module.formalDependencies.append(name); | 359 module.formalDependencies.append(name); |
| 360 v8::Handle<v8::Value> actual; | 360 v8::Handle<v8::Value> actual; |
| 361 if (child->document()) | 361 if (child->document()) |
| 362 actual = child->document()->exports().v8Value(); | 362 actual = child->document()->exports().v8Value(); |
| 363 if (actual.IsEmpty()) | 363 if (actual.IsEmpty()) |
| 364 actual = v8::Undefined(m_isolate); | 364 actual = v8::Undefined(m_isolate); |
| 365 module.resolvedDependencies.append(actual); | 365 module.resolvedDependencies.append(actual); |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 } | 368 } |
| 369 } | 369 } |
| 370 | 370 |
| 371 V8ScriptRunner::runModule(m_isolate, m_frame->document(), module); | 371 V8ScriptRunner::runModule(m_isolate, m_frame->document(), module); |
| 372 } | 372 } |
| 373 | 373 |
| 374 } // namespace blink | 374 } // namespace blink |
| OLD | NEW |