| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2010-2011 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 ScriptValue ScriptDebugServer::currentCallFrames() | 370 ScriptValue ScriptDebugServer::currentCallFrames() |
| 371 { | 371 { |
| 372 return currentCallFramesInner(AllScopes); | 372 return currentCallFramesInner(AllScopes); |
| 373 } | 373 } |
| 374 | 374 |
| 375 ScriptValue ScriptDebugServer::currentCallFramesForAsyncStack() | 375 ScriptValue ScriptDebugServer::currentCallFramesForAsyncStack() |
| 376 { | 376 { |
| 377 return currentCallFramesInner(FastAsyncScopes); | 377 return currentCallFramesInner(FastAsyncScopes); |
| 378 } | 378 } |
| 379 | 379 |
| 380 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::topCallFrameNoSco
pes() | 380 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::callFrameNoScopes
(int index) |
| 381 { | 381 { |
| 382 return wrapCallFrames(1, NoScopes); | 382 v8::Handle<v8::Value> currentCallFrameV8; |
| 383 if (m_executionState.IsEmpty()) { |
| 384 v8::Handle<v8::Function> currentCallFrameFunction = v8::Local<v8::Functi
on>::Cast(m_debuggerScript.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "c
urrentCallFrameByIndex"))); |
| 385 currentCallFrameV8 = v8::Debug::Call(currentCallFrameFunction, v8::Integ
er::New(m_isolate, index)); |
| 386 } else { |
| 387 v8::Handle<v8::Value> argv[] = { m_executionState, v8::Integer::New(m_is
olate, index) }; |
| 388 currentCallFrameV8 = callDebuggerMethod("currentCallFrameByIndex", WTF_A
RRAY_LENGTH(argv), argv); |
| 389 } |
| 390 ASSERT(!currentCallFrameV8.IsEmpty()); |
| 391 if (!currentCallFrameV8->IsObject()) |
| 392 return nullptr; |
| 393 return JavaScriptCallFrame::create(v8::Debug::GetDebugContext(), v8::Handle<
v8::Object>::Cast(currentCallFrameV8)); |
| 383 } | 394 } |
| 384 | 395 |
| 385 void ScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task, v8::Isolate* isol
ate) | 396 void ScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task, v8::Isolate* isol
ate) |
| 386 { | 397 { |
| 387 v8::Debug::DebugBreakForCommand(isolate, new ClientDataImpl(task)); | 398 v8::Debug::DebugBreakForCommand(isolate, new ClientDataImpl(task)); |
| 388 } | 399 } |
| 389 | 400 |
| 390 void ScriptDebugServer::runPendingTasks() | 401 void ScriptDebugServer::runPendingTasks() |
| 391 { | 402 { |
| 392 v8::Debug::ProcessDebugMessages(); | 403 v8::Debug::ProcessDebugMessages(); |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 { | 677 { |
| 667 return PassOwnPtr<ScriptSourceCode>(); | 678 return PassOwnPtr<ScriptSourceCode>(); |
| 668 } | 679 } |
| 669 | 680 |
| 670 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) | 681 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) |
| 671 { | 682 { |
| 672 return source; | 683 return source; |
| 673 } | 684 } |
| 674 | 685 |
| 675 } // namespace blink | 686 } // namespace blink |
| OLD | NEW |