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

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

Issue 761143003: DevTools: remove ScriptPreprocessor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 10 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 if (event != v8::AsyncTaskEvent && event != v8::Break && event != v8::Except ion && event != v8::AfterCompile && event != v8::BeforeCompile && event != v8::C ompileError && event != v8::PromiseEvent) 523 if (event != v8::AsyncTaskEvent && event != v8::Break && event != v8::Except ion && event != v8::AfterCompile && event != v8::BeforeCompile && event != v8::C ompileError && event != v8::PromiseEvent)
524 return; 524 return;
525 525
526 v8::Handle<v8::Context> eventContext = eventDetails.GetEventContext(); 526 v8::Handle<v8::Context> eventContext = eventDetails.GetEventContext();
527 ASSERT(!eventContext.IsEmpty()); 527 ASSERT(!eventContext.IsEmpty());
528 528
529 ScriptDebugListener* listener = getDebugListenerForContext(eventContext); 529 ScriptDebugListener* listener = getDebugListenerForContext(eventContext);
530 if (listener) { 530 if (listener) {
531 v8::HandleScope scope(m_isolate); 531 v8::HandleScope scope(m_isolate);
532 if (event == v8::BeforeCompile) { 532 if (event == v8::AfterCompile || event == v8::CompileError) {
533 preprocessBeforeCompile(eventDetails);
534 } else if (event == v8::AfterCompile || event == v8::CompileError) {
535 v8::Context::Scope contextScope(v8::Debug::GetDebugContext()); 533 v8::Context::Scope contextScope(v8::Debug::GetDebugContext());
536 v8::Handle<v8::Value> argv[] = { eventDetails.GetEventData() }; 534 v8::Handle<v8::Value> argv[] = { eventDetails.GetEventData() };
537 v8::Handle<v8::Value> value = callDebuggerMethod("getAfterCompileScr ipt", 1, argv); 535 v8::Handle<v8::Value> value = callDebuggerMethod("getAfterCompileScr ipt", 1, argv);
538 ASSERT(value->IsObject()); 536 ASSERT(value->IsObject());
539 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value); 537 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value);
540 dispatchDidParseSource(listener, object, event != v8::AfterCompile ? CompileError : CompileSuccess); 538 dispatchDidParseSource(listener, object, event != v8::AfterCompile ? CompileError : CompileSuccess);
541 } else if (event == v8::Exception) { 539 } else if (event == v8::Exception) {
542 v8::Handle<v8::Object> eventData = eventDetails.GetEventData(); 540 v8::Handle<v8::Object> eventData = eventDetails.GetEventData();
543 v8::Handle<v8::Value> exception = callInternalGetterFunction(eventDa ta, "exception", m_isolate); 541 v8::Handle<v8::Value> exception = callInternalGetterFunction(eventDa ta, "exception", m_isolate);
544 v8::Handle<v8::Value> promise = callInternalGetterFunction(eventData , "promise", m_isolate); 542 v8::Handle<v8::Value> promise = callInternalGetterFunction(eventData , "promise", m_isolate);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 *columnNumber = message->GetStartColumn(); 743 *columnNumber = message->GetStartColumn();
746 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac e(); 744 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac e();
747 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount () > 0) 745 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount () > 0)
748 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace , messageStackTrace->GetFrameCount()); 746 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace , messageStackTrace->GetFrameCount());
749 } 747 }
750 } else { 748 } else {
751 *result = ScriptValue(scriptState, value); 749 *result = ScriptValue(scriptState, value);
752 } 750 }
753 } 751 }
754 752
755 ScriptSourceCode ScriptDebugServer::preprocess(LocalFrame*, const ScriptSourceCo de&)
756 {
757 return ScriptSourceCode();
758 }
759
760 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName)
761 {
762 return source;
763 }
764
765 } // namespace blink 753 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptDebugServer.h ('k') | Source/bindings/core/v8/ScriptPreprocessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698