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:
Adam Barth 2014-10-31 15:02:45 -07:00
parent 0b40ab943e
commit e1c150ffca
3 changed files with 5 additions and 4 deletions

View File

@ -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()) {

View File

@ -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();
}

View File

@ -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;