mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Drop support for this.exports
Please use module.exports instead. As far as I know, all code in the repo has been converted over to the new style. R=esprehn@chromium.org Review URL: https://codereview.chromium.org/698543006
This commit is contained in:
parent
0b40ab943e
commit
e1c150ffca
@ -347,7 +347,8 @@ void ScriptController::executeModuleScript(Document& document, const String& sou
|
||||
V8ScriptModule module;
|
||||
module.resourceName = document.url().string();
|
||||
module.textPosition = textPosition;
|
||||
module.receiver = toV8(&document, context->Global(), m_isolate);
|
||||
// FIXME: This should be the actual module object instead of the document.
|
||||
module.moduleObject = toV8(&document, context->Global(), m_isolate);
|
||||
module.source = source;
|
||||
|
||||
if (HTMLImport* parent = document.import()) {
|
||||
|
||||
@ -224,11 +224,11 @@ void V8ScriptRunner::runModule(v8::Isolate* isolate, ExecutionContext* context,
|
||||
v8::Handle<v8::Value> scriptResult = script->Run();
|
||||
|
||||
auto arguments = module.resolvedDependencies;
|
||||
arguments.append(module.receiver);
|
||||
arguments.append(module.moduleObject);
|
||||
|
||||
RELEASE_ASSERT(scriptResult->IsObject());
|
||||
scriptResult.As<v8::Object>()->CallAsFunction(
|
||||
module.receiver, arguments.size(), arguments.data());
|
||||
v8::Null(isolate), arguments.size(), arguments.data());
|
||||
crashIfV8IsDead();
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ class ExecutionContext;
|
||||
struct V8ScriptModule {
|
||||
String resourceName;
|
||||
TextPosition textPosition;
|
||||
v8::Handle<v8::Value> receiver;
|
||||
v8::Handle<v8::Value> moduleObject;
|
||||
String source;
|
||||
Vector<String> formalDependencies;
|
||||
Vector<v8::Handle<v8::Value> > resolvedDependencies;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user