| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if (!message.IsEmpty()) | 289 if (!message.IsEmpty()) |
| 290 *exceptionDetails = scope.injectedScript()->createExceptionDetails(m
essage); | 290 *exceptionDetails = scope.injectedScript()->createExceptionDetails(m
essage); |
| 291 else | 291 else |
| 292 *errorString = "Script compilation failed"; | 292 *errorString = "Script compilation failed"; |
| 293 return; | 293 return; |
| 294 } | 294 } |
| 295 | 295 |
| 296 if (!persistScript) | 296 if (!persistScript) |
| 297 return; | 297 return; |
| 298 | 298 |
| 299 String16 scriptValueId = String16::number(script->GetUnboundScript()->GetId(
)); | 299 String16 scriptValueId = String16::fromInteger(script->GetUnboundScript()->G
etId()); |
| 300 std::unique_ptr<v8::Global<v8::Script>> global(new v8::Global<v8::Script>(m_
debugger->isolate(), script)); | 300 std::unique_ptr<v8::Global<v8::Script>> global(new v8::Global<v8::Script>(m_
debugger->isolate(), script)); |
| 301 m_compiledScripts[scriptValueId] = std::move(global); | 301 m_compiledScripts[scriptValueId] = std::move(global); |
| 302 *scriptId = scriptValueId; | 302 *scriptId = scriptValueId; |
| 303 } | 303 } |
| 304 | 304 |
| 305 void V8RuntimeAgentImpl::runScript(ErrorString* errorString, | 305 void V8RuntimeAgentImpl::runScript(ErrorString* errorString, |
| 306 const String16& scriptId, | 306 const String16& scriptId, |
| 307 int executionContextId, | 307 int executionContextId, |
| 308 const Maybe<String16>& objectGroup, | 308 const Maybe<String16>& objectGroup, |
| 309 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, | 309 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 } | 434 } |
| 435 | 435 |
| 436 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP
review) | 436 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP
review) |
| 437 { | 437 { |
| 438 DCHECK(message->origin() == V8MessageOrigin::kException || message->origin()
== V8MessageOrigin::kRevokedException); | 438 DCHECK(message->origin() == V8MessageOrigin::kException || message->origin()
== V8MessageOrigin::kRevokedException); |
| 439 message->reportToFrontend(&m_frontend, m_session, generatePreview); | 439 message->reportToFrontend(&m_frontend, m_session, generatePreview); |
| 440 m_frontend.flush(); | 440 m_frontend.flush(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 } // namespace blink | 443 } // namespace blink |
| OLD | NEW |