| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 v8::Handle<v8::Function> func = v8::Handle<v8::Function>::Cast(callFrame->Ge
t(v8AtomicString(m_isolate, "scopeChain"))); | 115 v8::Handle<v8::Function> func = v8::Handle<v8::Function>::Cast(callFrame->Ge
t(v8AtomicString(m_isolate, "scopeChain"))); |
| 116 v8::Handle<v8::Array> scopeChain = v8::Handle<v8::Array>::Cast(func->Call(ca
llFrame, 0, 0)); | 116 v8::Handle<v8::Array> scopeChain = v8::Handle<v8::Array>::Cast(func->Call(ca
llFrame, 0, 0)); |
| 117 v8::Handle<v8::Array> result = v8::Array::New(m_isolate, scopeChain->Length(
)); | 117 v8::Handle<v8::Array> result = v8::Array::New(m_isolate, scopeChain->Length(
)); |
| 118 for (uint32_t i = 0; i < scopeChain->Length(); i++) | 118 for (uint32_t i = 0; i < scopeChain->Length(); i++) |
| 119 result->Set(i, scopeChain->Get(i)); | 119 result->Set(i, scopeChain->Get(i)); |
| 120 return result; | 120 return result; |
| 121 } | 121 } |
| 122 | 122 |
| 123 int JavaScriptCallFrame::scopeType(int scopeIndex) const | 123 int JavaScriptCallFrame::scopeType(int scopeIndex) const |
| 124 { | 124 { |
| 125 v8::Handle<v8::Array> scopeType = v8::Handle<v8::Array>::Cast(m_callFrame.ne
wLocal(m_isolate)->Get(v8AtomicString(m_isolate, "scopeType"))); | 125 v8::Handle<v8::Object> callFrame = m_callFrame.newLocal(m_isolate); |
| 126 v8::Handle<v8::Function> func = v8::Handle<v8::Function>::Cast(callFrame->Ge
t(v8AtomicString(m_isolate, "scopeType"))); |
| 127 v8::Handle<v8::Array> scopeType = v8::Handle<v8::Array>::Cast(func->Call(cal
lFrame, 0, 0)); |
| 126 return scopeType->Get(scopeIndex)->Int32Value(); | 128 return scopeType->Get(scopeIndex)->Int32Value(); |
| 127 } | 129 } |
| 128 | 130 |
| 129 v8::Handle<v8::Value> JavaScriptCallFrame::thisObject() const | 131 v8::Handle<v8::Value> JavaScriptCallFrame::thisObject() const |
| 130 { | 132 { |
| 131 return m_callFrame.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "thisO
bject")); | 133 return m_callFrame.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "thisO
bject")); |
| 132 } | 134 } |
| 133 | 135 |
| 134 String JavaScriptCallFrame::stepInPositions() const | 136 String JavaScriptCallFrame::stepInPositions() const |
| 135 { | 137 { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "line"), v8::Integer:
:New(isolate, message->GetLineNumber())); | 203 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "line"), v8::Integer:
:New(isolate, message->GetLineNumber())); |
| 202 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "column"), v8::Intege
r::New(isolate, message->GetStartColumn())); | 204 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "column"), v8::Intege
r::New(isolate, message->GetStartColumn())); |
| 203 if (!message->GetStackTrace().IsEmpty()) | 205 if (!message->GetStackTrace().IsEmpty()) |
| 204 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "stackTrace"), me
ssage->GetStackTrace()->AsArray()); | 206 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "stackTrace"), me
ssage->GetStackTrace()->AsArray()); |
| 205 else | 207 else |
| 206 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "stackTrace"), v8
::Undefined(isolate)); | 208 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "stackTrace"), v8
::Undefined(isolate)); |
| 207 return exceptionDetails; | 209 return exceptionDetails; |
| 208 } | 210 } |
| 209 | 211 |
| 210 } // namespace blink | 212 } // namespace blink |
| OLD | NEW |