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

Side by Side Diff: src/api.cc

Issue 18089024: Handlify JSObject::SetPrototype method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | src/handles.h » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3477 matching lines...) Expand 10 before | Expand all | Expand 10 after
3488 bool v8::Object::SetPrototype(Handle<Value> value) { 3488 bool v8::Object::SetPrototype(Handle<Value> value) {
3489 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3489 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3490 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false); 3490 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false);
3491 ENTER_V8(isolate); 3491 ENTER_V8(isolate);
3492 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 3492 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3493 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); 3493 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
3494 // We do not allow exceptions thrown while setting the prototype 3494 // We do not allow exceptions thrown while setting the prototype
3495 // to propagate outside. 3495 // to propagate outside.
3496 TryCatch try_catch; 3496 TryCatch try_catch;
3497 EXCEPTION_PREAMBLE(isolate); 3497 EXCEPTION_PREAMBLE(isolate);
3498 i::Handle<i::Object> result = i::SetPrototype(self, value_obj); 3498 i::Handle<i::Object> result = i::JSObject::SetPrototype(self, value_obj);
3499 has_pending_exception = result.is_null(); 3499 has_pending_exception = result.is_null();
3500 EXCEPTION_BAILOUT_CHECK(isolate, false); 3500 EXCEPTION_BAILOUT_CHECK(isolate, false);
3501 return true; 3501 return true;
3502 } 3502 }
3503 3503
3504 3504
3505 Local<Object> v8::Object::FindInstanceInPrototypeChain( 3505 Local<Object> v8::Object::FindInstanceInPrototypeChain(
3506 v8::Handle<FunctionTemplate> tmpl) { 3506 v8::Handle<FunctionTemplate> tmpl) {
3507 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3507 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3508 ON_BAILOUT(isolate, 3508 ON_BAILOUT(isolate,
(...skipping 4530 matching lines...) Expand 10 before | Expand all | Expand 10 after
8039 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8039 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8040 Address callback_address = 8040 Address callback_address =
8041 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8041 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8042 VMState<EXTERNAL> state(isolate); 8042 VMState<EXTERNAL> state(isolate);
8043 ExternalCallbackScope call_scope(isolate, callback_address); 8043 ExternalCallbackScope call_scope(isolate, callback_address);
8044 return callback(info); 8044 return callback(info);
8045 } 8045 }
8046 8046
8047 8047
8048 } } // namespace v8::internal 8048 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/handles.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698