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

Side by Side Diff: src/api.cc

Issue 204693002: Handlify callers to GetElementNoException. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 9 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/execution.cc » ('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 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 } 2196 }
2197 2197
2198 2198
2199 // --- S t a c k T r a c e --- 2199 // --- S t a c k T r a c e ---
2200 2200
2201 Local<StackFrame> StackTrace::GetFrame(uint32_t index) const { 2201 Local<StackFrame> StackTrace::GetFrame(uint32_t index) const {
2202 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 2202 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
2203 ENTER_V8(isolate); 2203 ENTER_V8(isolate);
2204 EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate)); 2204 EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate));
2205 i::Handle<i::JSArray> self = Utils::OpenHandle(this); 2205 i::Handle<i::JSArray> self = Utils::OpenHandle(this);
2206 i::Object* raw_object = self->GetElementNoExceptionThrown(isolate, index); 2206 i::Handle<i::Object> obj =
2207 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_object)); 2207 i::Object::GetElementNoExceptionThrown(isolate, self, index);
2208 return scope.Escape(Utils::StackFrameToLocal(obj)); 2208 i::Handle<i::JSObject> jsobj = i::Handle<i::JSObject>::cast(obj);
2209 return scope.Escape(Utils::StackFrameToLocal(jsobj));
2209 } 2210 }
2210 2211
2211 2212
2212 int StackTrace::GetFrameCount() const { 2213 int StackTrace::GetFrameCount() const {
2213 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 2214 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
2214 ENTER_V8(isolate); 2215 ENTER_V8(isolate);
2215 return i::Smi::cast(Utils::OpenHandle(this)->length())->value(); 2216 return i::Smi::cast(Utils::OpenHandle(this)->length())->value();
2216 } 2217 }
2217 2218
2218 2219
(...skipping 5372 matching lines...) Expand 10 before | Expand all | Expand 10 after
7591 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7592 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7592 Address callback_address = 7593 Address callback_address =
7593 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7594 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7594 VMState<EXTERNAL> state(isolate); 7595 VMState<EXTERNAL> state(isolate);
7595 ExternalCallbackScope call_scope(isolate, callback_address); 7596 ExternalCallbackScope call_scope(isolate, callback_address);
7596 callback(info); 7597 callback(info);
7597 } 7598 }
7598 7599
7599 7600
7600 } } // namespace v8::internal 7601 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698