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

Side by Side Diff: src/api.cc

Issue 22990003: Add RemovePrototype to FunctionTemplate (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 1400
1401 void FunctionTemplate::ReadOnlyPrototype() { 1401 void FunctionTemplate::ReadOnlyPrototype() {
1402 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 1402 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1403 if (IsDeadCheck(isolate, "v8::FunctionTemplate::ReadOnlyPrototype()")) { 1403 if (IsDeadCheck(isolate, "v8::FunctionTemplate::ReadOnlyPrototype()")) {
1404 return; 1404 return;
1405 } 1405 }
1406 ENTER_V8(isolate); 1406 ENTER_V8(isolate);
1407 Utils::OpenHandle(this)->set_read_only_prototype(true); 1407 Utils::OpenHandle(this)->set_read_only_prototype(true);
1408 } 1408 }
1409 1409
1410
1411 void FunctionTemplate::RemovePrototype() {
1412 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1413 if (IsDeadCheck(isolate, "v8::FunctionTemplate::RemovePrototype()")) {
1414 return;
1415 }
1416 ENTER_V8(isolate);
1417 Utils::OpenHandle(this)->set_remove_prototype(true);
1418 }
1419
1420
1410 template< 1421 template<
1411 typename Getter, 1422 typename Getter,
1412 typename Setter, 1423 typename Setter,
1413 typename Query, 1424 typename Query,
1414 typename Deleter, 1425 typename Deleter,
1415 typename Enumerator> 1426 typename Enumerator>
1416 static void SetNamedInstancePropertyHandler( 1427 static void SetNamedInstancePropertyHandler(
1417 i::Handle<i::FunctionTemplateInfo> function_template, 1428 i::Handle<i::FunctionTemplateInfo> function_template,
1418 Getter getter_in, 1429 Getter getter_in,
1419 Setter setter_in, 1430 Setter setter_in,
(...skipping 6762 matching lines...) Expand 10 before | Expand all | Expand 10 after
8182 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8193 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8183 Address callback_address = 8194 Address callback_address =
8184 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8195 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8185 VMState<EXTERNAL> state(isolate); 8196 VMState<EXTERNAL> state(isolate);
8186 ExternalCallbackScope call_scope(isolate, callback_address); 8197 ExternalCallbackScope call_scope(isolate, callback_address);
8187 return callback(info); 8198 return callback(info);
8188 } 8199 }
8189 8200
8190 8201
8191 } } // namespace v8::internal 8202 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/apinatives.js » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698