| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "stackTrace"), v8
::Undefined(isolate)); | 213 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "stackTrace"), v8
::Undefined(isolate)); |
| 212 return exceptionDetails; | 214 return exceptionDetails; |
| 213 } | 215 } |
| 214 | 216 |
| 215 void JavaScriptCallFrame::trace(Visitor* visitor) | 217 void JavaScriptCallFrame::trace(Visitor* visitor) |
| 216 { | 218 { |
| 217 visitor->trace(m_caller); | 219 visitor->trace(m_caller); |
| 218 } | 220 } |
| 219 | 221 |
| 220 } // namespace blink | 222 } // namespace blink |
| OLD | NEW |