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

Unified Diff: src/templates.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/runtime/runtime-scopes.cc ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/templates.js
diff --git a/src/templates.js b/src/templates.js
index b7e1527fc65746666f85c4230faadac12bef2dfc..b273bc39e816e1a828e891506564113b3ae526c3 100644
--- a/src/templates.js
+++ b/src/templates.js
@@ -4,8 +4,6 @@
// Called from a desugaring in the parser.
-var $getTemplateCallSite;
-
(function(global, utils) {
"use strict";
@@ -67,7 +65,7 @@ function SetCachedCallSite(siteObj, hash) {
}
-$getTemplateCallSite = function(siteObj, rawStrings, hash) {
+function GetTemplateCallSite(siteObj, rawStrings, hash) {
var cached = GetCachedCallSite(rawStrings, hash);
if (!IS_UNDEFINED(cached)) return cached;
@@ -78,4 +76,9 @@ $getTemplateCallSite = function(siteObj, rawStrings, hash) {
return SetCachedCallSite(%ObjectFreeze(siteObj), hash);
}
+// ----------------------------------------------------------------------------
+// Exports
+
+%InstallToContext(["get_template_call_site", GetTemplateCallSite]);
+
})
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698