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

Side by Side Diff: Source/bindings/v8/ScriptDebugServer.cpp

Issue 466243002: Support merged Dart-JS callstacks (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 4 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
OLDNEW
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 ASSERT(!currentCallFrameV8.IsEmpty()); 339 ASSERT(!currentCallFrameV8.IsEmpty());
340 if (!currentCallFrameV8->IsObject()) 340 if (!currentCallFrameV8->IsObject())
341 return nullptr; 341 return nullptr;
342 return JavaScriptCallFrame::create(v8::Debug::GetDebugContext(), v8::Handle< v8::Object>::Cast(currentCallFrameV8)); 342 return JavaScriptCallFrame::create(v8::Debug::GetDebugContext(), v8::Handle< v8::Object>::Cast(currentCallFrameV8));
343 } 343 }
344 344
345 StackTrace ScriptDebugServer::currentCallFramesInner(ScopeInfoDetails scopeDetai ls) 345 StackTrace ScriptDebugServer::currentCallFramesInner(ScopeInfoDetails scopeDetai ls)
346 { 346 {
347 if (!m_isolate->InContext()) 347 if (!m_isolate->InContext())
348 return StackTrace(ScriptValue()); 348 return StackTrace();
349 v8::HandleScope handleScope(m_isolate); 349 v8::HandleScope handleScope(m_isolate);
350 350
351 RefPtrWillBeRawPtr<JavaScriptCallFrame> currentCallFrame = wrapCallFrames(0, scopeDetails); 351 RefPtrWillBeRawPtr<JavaScriptCallFrame> currentCallFrame = wrapCallFrames(0, scopeDetails);
352 if (!currentCallFrame) 352 if (!currentCallFrame)
353 return StackTrace(ScriptValue()); 353 return StackTrace();
354 354
355 V8ScriptState* scriptState = m_pausedScriptState ? m_pausedScriptState->v8Sc riptState() : V8ScriptState::current(m_isolate); 355 V8ScriptState* scriptState = m_pausedScriptState ? m_pausedScriptState->v8Sc riptState() : V8ScriptState::current(m_isolate);
356 V8ScriptState::Scope scope(scriptState); 356 V8ScriptState::Scope scope(scriptState);
357 return StackTrace(ScriptValue(scriptState, toV8(currentCallFrame.release(), scriptState->context()->Global(), m_isolate))); 357 return StackTrace(ScriptValue(scriptState, toV8(currentCallFrame.release(), scriptState->context()->Global(), m_isolate)), scriptState);
358 } 358 }
359 359
360
360 StackTrace ScriptDebugServer::currentCallFrames() 361 StackTrace ScriptDebugServer::currentCallFrames()
361 { 362 {
363 return StackTrace(currentCallFramesForVm(), m_peer->currentCallFramesForVm() );
364 }
365
366 StackTrace ScriptDebugServer::currentCallFramesForVm()
367 {
362 return currentCallFramesInner(AllScopes); 368 return currentCallFramesInner(AllScopes);
363 } 369 }
364 370
365 StackTrace ScriptDebugServer::currentCallFramesForAsyncStack() 371 StackTrace ScriptDebugServer::currentCallFramesForAsyncStack()
366 { 372 {
367 return currentCallFramesInner(FastAsyncScopes); 373 return currentCallFramesInner(FastAsyncScopes);
368 } 374 }
369 375
370 ScriptCallFrame ScriptDebugServer::topCallFrameNoScopes() 376 ScriptCallFrame ScriptDebugServer::topCallFrameNoScopes()
371 { 377 {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 { 650 {
645 return PassOwnPtr<ScriptSourceCode>(); 651 return PassOwnPtr<ScriptSourceCode>();
646 } 652 }
647 653
648 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName) 654 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName)
649 { 655 {
650 return source; 656 return source;
651 } 657 }
652 658
653 } // namespace WebCore 659 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698