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

Side by Side Diff: src/api.cc

Issue 247013002: Replaced empty handle checks with MaybeHandles (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed unnecessary assert. Created 6 years, 8 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/isolate.h » ('j') | no next file with comments »
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 3149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3160 bool v8::Object::SetPrototype(Handle<Value> value) { 3160 bool v8::Object::SetPrototype(Handle<Value> value) {
3161 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3161 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3162 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false); 3162 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false);
3163 ENTER_V8(isolate); 3163 ENTER_V8(isolate);
3164 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 3164 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3165 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); 3165 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
3166 // We do not allow exceptions thrown while setting the prototype 3166 // We do not allow exceptions thrown while setting the prototype
3167 // to propagate outside. 3167 // to propagate outside.
3168 TryCatch try_catch; 3168 TryCatch try_catch;
3169 EXCEPTION_PREAMBLE(isolate); 3169 EXCEPTION_PREAMBLE(isolate);
3170 i::Handle<i::Object> result = i::JSObject::SetPrototype(self, value_obj); 3170 i::MaybeHandle<i::Object> result = i::JSObject::SetPrototype(
3171 self, value_obj);
3171 has_pending_exception = result.is_null(); 3172 has_pending_exception = result.is_null();
3172 EXCEPTION_BAILOUT_CHECK(isolate, false); 3173 EXCEPTION_BAILOUT_CHECK(isolate, false);
3173 return true; 3174 return true;
3174 } 3175 }
3175 3176
3176 3177
3177 Local<Object> v8::Object::FindInstanceInPrototypeChain( 3178 Local<Object> v8::Object::FindInstanceInPrototypeChain(
3178 v8::Handle<FunctionTemplate> tmpl) { 3179 v8::Handle<FunctionTemplate> tmpl) {
3179 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3180 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3180 ON_BAILOUT(isolate, 3181 ON_BAILOUT(isolate,
(...skipping 4432 matching lines...) Expand 10 before | Expand all | Expand 10 after
7613 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7614 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7614 Address callback_address = 7615 Address callback_address =
7615 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7616 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7616 VMState<EXTERNAL> state(isolate); 7617 VMState<EXTERNAL> state(isolate);
7617 ExternalCallbackScope call_scope(isolate, callback_address); 7618 ExternalCallbackScope call_scope(isolate, callback_address);
7618 callback(info); 7619 callback(info);
7619 } 7620 }
7620 7621
7621 7622
7622 } } // namespace v8::internal 7623 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698