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

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

Issue 929953002: CachedMetadata support for ServiceWorker script. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated tkent's comment 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
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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 684 }
685 685
686 void ScriptDebugServer::compileScript(ScriptState* scriptState, const String& ex pression, const String& sourceURL, bool persistScript, String* scriptId, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<Sc riptCallStack>* stackTrace) 686 void ScriptDebugServer::compileScript(ScriptState* scriptState, const String& ex pression, const String& sourceURL, bool persistScript, String* scriptId, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<Sc riptCallStack>* stackTrace)
687 { 687 {
688 if (!scriptState->contextIsValid()) 688 if (!scriptState->contextIsValid())
689 return; 689 return;
690 ScriptState::Scope scope(scriptState); 690 ScriptState::Scope scope(scriptState);
691 691
692 v8::Handle<v8::String> source = v8String(m_isolate, expression); 692 v8::Handle<v8::String> source = v8String(m_isolate, expression);
693 v8::TryCatch tryCatch; 693 v8::TryCatch tryCatch;
694 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU RL, TextPosition(), 0, 0, m_isolate); 694 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU RL, TextPosition(), m_isolate);
695 if (tryCatch.HasCaught()) { 695 if (tryCatch.HasCaught()) {
696 v8::Local<v8::Message> message = tryCatch.Message(); 696 v8::Local<v8::Message> message = tryCatch.Message();
697 if (!message.IsEmpty()) { 697 if (!message.IsEmpty()) {
698 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message ->Get()); 698 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message ->Get());
699 *lineNumber = message->GetLineNumber(); 699 *lineNumber = message->GetLineNumber();
700 *columnNumber = message->GetStartColumn(); 700 *columnNumber = message->GetStartColumn();
701 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac e(); 701 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac e();
702 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount () > 0) 702 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount () > 0)
703 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace , messageStackTrace->GetFrameCount()); 703 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace , messageStackTrace->GetFrameCount());
704 } 704 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac e(); 744 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac e();
745 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount () > 0) 745 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount () > 0)
746 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace , messageStackTrace->GetFrameCount()); 746 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace , messageStackTrace->GetFrameCount());
747 } 747 }
748 } else { 748 } else {
749 *result = ScriptValue(scriptState, value); 749 *result = ScriptValue(scriptState, value);
750 } 750 }
751 } 751 }
752 752
753 } // namespace blink 753 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/PrivateScriptRunner.cpp ('k') | Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698