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

Unified Diff: src/collection.js

Issue 1306993003: Call JS functions via native context instead of js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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 | « src/code-stubs-hydrogen.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index 4dff566049d9f01d54374c53cffd0bad93efb94a..718ca9be67e3d3d4e12277429a1e3c7eda3efaf0 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -502,16 +502,16 @@ function SetFromArray(array) {
// -----------------------------------------------------------------------
// Exports
-utils.ExportToRuntime(function(to) {
- to["map_get"] = MapGet;
- to["map_set"] = MapSet;
- to["map_has"] = MapHas;
- to["map_delete"] = MapDelete;
- to["set_add"] = SetAdd;
- to["set_has"] = SetHas;
- to["set_delete"] = SetDelete;
- to["map_from_array"] = MapFromArray;
- to["set_from_array"]= SetFromArray;
-});
+%InstallToContext([
+ "map_get", MapGet,
+ "map_set", MapSet,
+ "map_has", MapHas,
+ "map_delete", MapDelete,
+ "set_add", SetAdd,
+ "set_has", SetHas,
+ "set_delete", SetDelete,
+ "map_from_array", MapFromArray,
+ "set_from_array",SetFromArray,
+]);
})
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698