| OLD | NEW |
| 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 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2349 i::HandleScope scope(isolate); | 2349 i::HandleScope scope(isolate); |
| 2350 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2350 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2351 i::Handle<i::Object> column = GetProperty(self, "column"); | 2351 i::Handle<i::Object> column = GetProperty(self, "column"); |
| 2352 if (!column->IsSmi()) { | 2352 if (!column->IsSmi()) { |
| 2353 return Message::kNoColumnInfo; | 2353 return Message::kNoColumnInfo; |
| 2354 } | 2354 } |
| 2355 return i::Smi::cast(*column)->value(); | 2355 return i::Smi::cast(*column)->value(); |
| 2356 } | 2356 } |
| 2357 | 2357 |
| 2358 | 2358 |
| 2359 int StackFrame::GetScriptId() const { |
| 2360 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 2361 if (IsDeadCheck(isolate, "v8::StackFrame::GetScriptId()")) { |
| 2362 return Message::kNoScriptIdInfo; |
| 2363 } |
| 2364 ENTER_V8(isolate); |
| 2365 i::HandleScope scope(isolate); |
| 2366 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2367 i::Handle<i::Object> scriptId = GetProperty(self, "scriptId"); |
| 2368 if (!scriptId->IsSmi()) { |
| 2369 return Message::kNoScriptIdInfo; |
| 2370 } |
| 2371 return i::Smi::cast(*scriptId)->value(); |
| 2372 } |
| 2373 |
| 2374 |
| 2359 Local<String> StackFrame::GetScriptName() const { | 2375 Local<String> StackFrame::GetScriptName() const { |
| 2360 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 2376 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 2361 if (IsDeadCheck(isolate, "v8::StackFrame::GetScriptName()")) { | 2377 if (IsDeadCheck(isolate, "v8::StackFrame::GetScriptName()")) { |
| 2362 return Local<String>(); | 2378 return Local<String>(); |
| 2363 } | 2379 } |
| 2364 ENTER_V8(isolate); | 2380 ENTER_V8(isolate); |
| 2365 HandleScope scope(reinterpret_cast<Isolate*>(isolate)); | 2381 HandleScope scope(reinterpret_cast<Isolate*>(isolate)); |
| 2366 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2382 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2367 i::Handle<i::Object> name = GetProperty(self, "scriptName"); | 2383 i::Handle<i::Object> name = GetProperty(self, "scriptName"); |
| 2368 if (!name->IsString()) { | 2384 if (!name->IsString()) { |
| (...skipping 5477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7846 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7862 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7847 Address callback_address = | 7863 Address callback_address = |
| 7848 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7864 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7849 VMState<EXTERNAL> state(isolate); | 7865 VMState<EXTERNAL> state(isolate); |
| 7850 ExternalCallbackScope call_scope(isolate, callback_address); | 7866 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7851 return callback(info); | 7867 return callback(info); |
| 7852 } | 7868 } |
| 7853 | 7869 |
| 7854 | 7870 |
| 7855 } } // namespace v8::internal | 7871 } } // namespace v8::internal |
| OLD | NEW |