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

Side by Side Diff: src/api.cc

Issue 238973003: Handlify Object::GetPrototype and (most) callers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor 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
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 3160 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 return static_cast<PropertyAttribute>(result); 3171 return static_cast<PropertyAttribute>(result);
3172 } 3172 }
3173 3173
3174 3174
3175 Local<Value> v8::Object::GetPrototype() { 3175 Local<Value> v8::Object::GetPrototype() {
3176 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3176 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3177 ON_BAILOUT(isolate, "v8::Object::GetPrototype()", 3177 ON_BAILOUT(isolate, "v8::Object::GetPrototype()",
3178 return Local<v8::Value>()); 3178 return Local<v8::Value>());
3179 ENTER_V8(isolate); 3179 ENTER_V8(isolate);
3180 i::Handle<i::Object> self = Utils::OpenHandle(this); 3180 i::Handle<i::Object> self = Utils::OpenHandle(this);
3181 i::Handle<i::Object> result(self->GetPrototype(isolate), isolate); 3181 i::Handle<i::Object> result = i::Object::GetPrototype(isolate, self);
3182 return Utils::ToLocal(result); 3182 return Utils::ToLocal(result);
3183 } 3183 }
3184 3184
3185 3185
3186 bool v8::Object::SetPrototype(Handle<Value> value) { 3186 bool v8::Object::SetPrototype(Handle<Value> value) {
3187 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3187 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3188 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false); 3188 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false);
3189 ENTER_V8(isolate); 3189 ENTER_V8(isolate);
3190 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 3190 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3191 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); 3191 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
(...skipping 4434 matching lines...) Expand 10 before | Expand all | Expand 10 after
7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7627 Address callback_address = 7627 Address callback_address =
7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7629 VMState<EXTERNAL> state(isolate); 7629 VMState<EXTERNAL> state(isolate);
7630 ExternalCallbackScope call_scope(isolate, callback_address); 7630 ExternalCallbackScope call_scope(isolate, callback_address);
7631 callback(info); 7631 callback(info);
7632 } 7632 }
7633 7633
7634 7634
7635 } } // namespace v8::internal 7635 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698