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

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

Issue 260513004: DevTools: [Console] fix sourceurl when exception happens before inspector is open (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/bindings/v8/V8Initializer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 m_workerGlobalScope.script()->forbidExecution(); 177 m_workerGlobalScope.script()->forbidExecution();
178 return ScriptValue(); 178 return ScriptValue();
179 } 179 }
180 180
181 if (block.HasCaught()) { 181 if (block.HasCaught()) {
182 v8::Local<v8::Message> message = block.Message(); 182 v8::Local<v8::Message> message = block.Message();
183 state->hadException = true; 183 state->hadException = true;
184 state->errorMessage = toCoreString(message->Get()); 184 state->errorMessage = toCoreString(message->Get());
185 state->lineNumber = message->GetLineNumber(); 185 state->lineNumber = message->GetLineNumber();
186 state->columnNumber = message->GetStartColumn() + 1; 186 state->columnNumber = message->GetStartColumn() + 1;
187 TOSTRING_DEFAULT(V8StringResource<>, sourceURL, message->GetScriptResour ceName(), ScriptValue()); 187 TOSTRING_DEFAULT(V8StringResource<>, sourceURL, message->GetScriptOrigin ().ResourceName(), ScriptValue());
188 state->sourceURL = sourceURL; 188 state->sourceURL = sourceURL;
189 state->exception = ScriptValue(m_scriptState.get(), block.Exception()); 189 state->exception = ScriptValue(m_scriptState.get(), block.Exception());
190 block.Reset(); 190 block.Reset();
191 } else 191 } else
192 state->hadException = false; 192 state->hadException = false;
193 193
194 if (result.IsEmpty() || result->IsUndefined()) 194 if (result.IsEmpty() || result->IsUndefined())
195 return ScriptValue(); 195 return ScriptValue();
196 196
197 return ScriptValue(m_scriptState.get(), result); 197 return ScriptValue(m_scriptState.get(), result);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 m_disableEvalPending = errorMessage; 258 m_disableEvalPending = errorMessage;
259 } 259 }
260 260
261 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtrWillBe RawPtr<ErrorEvent> errorEvent) 261 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtrWillBe RawPtr<ErrorEvent> errorEvent)
262 { 262 {
263 m_errorEventFromImportedScript = errorEvent; 263 m_errorEventFromImportedScript = errorEvent;
264 throwError(V8ThrowException::createError(v8GeneralError, m_errorEventFromImp ortedScript->message(), m_isolate), m_isolate); 264 throwError(V8ThrowException::createError(v8GeneralError, m_errorEventFromImp ortedScript->message(), m_isolate), m_isolate);
265 } 265 }
266 266
267 } // namespace WebCore 267 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Initializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698