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

Unified Diff: src/api.cc

Issue 22990003: Add RemovePrototype to FunctionTemplate (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test that function throws when constructed Created 7 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 | « include/v8.h ('k') | src/apinatives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index eb2ffcff18094e3e3b2fe37c4a1dbe7276ea9e97..634d422ff301a430eaab46c585bd02a353ba0a51 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1407,6 +1407,17 @@ void FunctionTemplate::ReadOnlyPrototype() {
Utils::OpenHandle(this)->set_read_only_prototype(true);
}
+
+void FunctionTemplate::RemovePrototype() {
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
+ if (IsDeadCheck(isolate, "v8::FunctionTemplate::RemovePrototype()")) {
+ return;
+ }
+ ENTER_V8(isolate);
+ Utils::OpenHandle(this)->set_remove_prototype(true);
+}
+
+
template<
typename Getter,
typename Setter,
« no previous file with comments | « include/v8.h ('k') | src/apinatives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698