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

Side by Side Diff: sky/engine/v8_inspector/ScriptDebugServer.cpp

Issue 754463004: Remove ScriptPreprocessor (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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
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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 if (event != v8::AsyncTaskEvent && event != v8::Break && event != v8::Except ion && event != v8::AfterCompile && event != v8::BeforeCompile && event != v8::C ompileError && event != v8::PromiseEvent) 489 if (event != v8::AsyncTaskEvent && event != v8::Break && event != v8::Except ion && event != v8::AfterCompile && event != v8::BeforeCompile && event != v8::C ompileError && event != v8::PromiseEvent)
490 return; 490 return;
491 491
492 v8::Handle<v8::Context> eventContext = eventDetails.GetEventContext(); 492 v8::Handle<v8::Context> eventContext = eventDetails.GetEventContext();
493 ASSERT(!eventContext.IsEmpty()); 493 ASSERT(!eventContext.IsEmpty());
494 494
495 ScriptDebugListener* listener = getDebugListenerForContext(eventContext); 495 ScriptDebugListener* listener = getDebugListenerForContext(eventContext);
496 if (listener) { 496 if (listener) {
497 v8::HandleScope scope(m_isolate); 497 v8::HandleScope scope(m_isolate);
498 v8::Handle<v8::Object> debuggerScript = m_debuggerScript.newLocal(m_isol ate); 498 v8::Handle<v8::Object> debuggerScript = m_debuggerScript.newLocal(m_isol ate);
499 if (event == v8::BeforeCompile) { 499 if (event == v8::AfterCompile || event == v8::CompileError) {
500 preprocessBeforeCompile(eventDetails);
501 } else if (event == v8::AfterCompile || event == v8::CompileError) {
502 v8::Context::Scope contextScope(v8::Debug::GetDebugContext()); 500 v8::Context::Scope contextScope(v8::Debug::GetDebugContext());
503 v8::Handle<v8::Function> getAfterCompileScript = v8::Local<v8::Funct ion>::Cast(debuggerScript->Get(v8AtomicString(m_isolate, "getAfterCompileScript" ))); 501 v8::Handle<v8::Function> getAfterCompileScript = v8::Local<v8::Funct ion>::Cast(debuggerScript->Get(v8AtomicString(m_isolate, "getAfterCompileScript" )));
504 v8::Handle<v8::Value> argv[] = { eventDetails.GetEventData() }; 502 v8::Handle<v8::Value> argv[] = { eventDetails.GetEventData() };
505 v8::Handle<v8::Value> value = V8ScriptRunner::callInternalFunction(g etAfterCompileScript, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate); 503 v8::Handle<v8::Value> value = V8ScriptRunner::callInternalFunction(g etAfterCompileScript, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate);
506 ASSERT(value->IsObject()); 504 ASSERT(value->IsObject());
507 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value); 505 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value);
508 dispatchDidParseSource(listener, object, event != v8::AfterCompile ? CompileError : CompileSuccess); 506 dispatchDidParseSource(listener, object, event != v8::AfterCompile ? CompileError : CompileSuccess);
509 } else if (event == v8::Exception) { 507 } else if (event == v8::Exception) {
510 v8::Handle<v8::Object> eventData = eventDetails.GetEventData(); 508 v8::Handle<v8::Object> eventData = eventDetails.GetEventData();
511 v8::Handle<v8::Value> exception = callInternalGetterFunction(eventDa ta, "exception", m_isolate); 509 v8::Handle<v8::Value> exception = callInternalGetterFunction(eventDa ta, "exception", m_isolate);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message ->Get()); 694 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message ->Get());
697 *lineNumber = message->GetLineNumber(); 695 *lineNumber = message->GetLineNumber();
698 *columnNumber = message->GetStartColumn(); 696 *columnNumber = message->GetStartColumn();
699 *stackTrace = createScriptCallStack(message->GetStackTrace(), messag e->GetStackTrace()->GetFrameCount(), m_isolate); 697 *stackTrace = createScriptCallStack(message->GetStackTrace(), messag e->GetStackTrace()->GetFrameCount(), m_isolate);
700 } 698 }
701 } else { 699 } else {
702 *result = ScriptValue(scriptState, value); 700 *result = ScriptValue(scriptState, value);
703 } 701 }
704 } 702 }
705 703
706 PassOwnPtr<ScriptSourceCode> ScriptDebugServer::preprocess(LocalFrame*, const Sc riptSourceCode&)
707 {
708 return PassOwnPtr<ScriptSourceCode>();
709 }
710
711 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName)
712 {
713 return source;
714 }
715
716 } // namespace blink 704 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/v8_inspector/ScriptDebugServer.h ('k') | sky/engine/v8_inspector/ScriptPreprocessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698