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

Unified Diff: sky/engine/bindings/core/v8/ScriptValue.h

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/bindings/core/v8/ScriptController.cpp ('k') | sky/engine/bindings/templates/attributes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/core/v8/ScriptValue.h
diff --git a/sky/engine/bindings/core/v8/ScriptValue.h b/sky/engine/bindings/core/v8/ScriptValue.h
index 9102432ada395b4082bbe5861e5c49b9a791802a..41996d4d753c8c24daff0eb1a236a6b84908efa6 100644
--- a/sky/engine/bindings/core/v8/ScriptValue.h
+++ b/sky/engine/bindings/core/v8/ScriptValue.h
@@ -60,6 +60,11 @@ public:
ASSERT(isEmpty() || m_scriptState);
}
+ static ScriptValue createEmptyObject(ScriptState* scriptState)
+ {
+ return ScriptValue(scriptState, v8::Object::New(scriptState->isolate()));
+ }
+
ScriptState* scriptState() const
{
return m_scriptState.get();
« no previous file with comments | « sky/engine/bindings/core/v8/ScriptController.cpp ('k') | sky/engine/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698