Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: sky/engine/core/app/Module.cpp

Issue 872043003: module.exports should default to an empty object. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/app/Module.h ('k') | sky/engine/core/app/Module.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/app/Module.cpp
diff --git a/sky/engine/core/app/Module.cpp b/sky/engine/core/app/Module.cpp
index ed1f97223cc0ad39e675d3349ac472734092200d..02dc428899d5e9ce7226f46c9a7ac1ec3a49a33b 100644
--- a/sky/engine/core/app/Module.cpp
+++ b/sky/engine/core/app/Module.cpp
@@ -29,4 +29,14 @@ Application* Module::GetApplication() {
return application();
}
+void Module::setExports(ScriptState*, const ScriptValue& exports) {
+ exports_ = exports;
+}
+
+const ScriptValue& Module::exports(ScriptState* scriptState) const {
+ if (exports_.isEmpty())
+ exports_ = ScriptValue::createEmptyObject(scriptState);
+ return exports_;
+}
+
} // namespace blink
« no previous file with comments | « sky/engine/core/app/Module.h ('k') | sky/engine/core/app/Module.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698