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

Unified Diff: src/v8natives.js

Issue 996213003: Hide native Date implementation in function context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: padded formatting Created 5 years, 9 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
« src/i18n.js ('K') | « src/third_party/fdlibm/fdlibm.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 380c871e040ef47d263fbde0193d2545903359c6..490f39f4b4a2b95a2b9aa227204ad38a1ac0144e 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -32,6 +32,17 @@ function InstallFunctions(object, attributes, functions) {
}
+function OverrideFunction(object, name, f) {
+ ObjectDefineProperty(object, name, { value: f,
+ writeable: true,
+ configurable: true,
+ enumerable: false });
+ %FunctionSetName(f, name);
+ %FunctionRemovePrototype(f);
+ %SetNativeFlag(f);
+}
+
+
// Helper function to install a getter-only accessor property.
function InstallGetter(object, name, getter) {
%FunctionSetName(getter, name);
« src/i18n.js ('K') | « src/third_party/fdlibm/fdlibm.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698