OLD | NEW |
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 v8::Context::Scope contextScope(context); | 122 v8::Context::Scope contextScope(context); |
123 return unboundScript->BindToCurrentContext()->Run(context); | 123 return unboundScript->BindToCurrentContext()->Run(context); |
124 } | 124 } |
125 | 125 |
126 v8::MaybeLocal<v8::Script> V8InspectorImpl::compileScript( | 126 v8::MaybeLocal<v8::Script> V8InspectorImpl::compileScript( |
127 v8::Local<v8::Context> context, const String16& code, | 127 v8::Local<v8::Context> context, const String16& code, |
128 const String16& fileName) { | 128 const String16& fileName) { |
129 v8::ScriptOrigin origin( | 129 v8::ScriptOrigin origin( |
130 toV8String(m_isolate, fileName), v8::Integer::New(m_isolate, 0), | 130 toV8String(m_isolate, fileName), v8::Integer::New(m_isolate, 0), |
131 v8::Integer::New(m_isolate, 0), | 131 v8::Integer::New(m_isolate, 0), |
132 v8::False(m_isolate), // sharable | 132 v8::False(m_isolate), // sharable |
133 v8::Local<v8::Integer>(), v8::Boolean::New(m_isolate, false), // internal | 133 v8::Local<v8::Integer>(), toV8String(m_isolate, String16()), // sourceMap |
134 toV8String(m_isolate, String16()), // sourceMap | 134 v8::True(m_isolate)); // opaqueresource |
135 v8::True(m_isolate)); // opaqueresource | |
136 v8::ScriptCompiler::Source source(toV8String(m_isolate, code), origin); | 135 v8::ScriptCompiler::Source source(toV8String(m_isolate, code), origin); |
137 return v8::ScriptCompiler::Compile(context, &source, | 136 return v8::ScriptCompiler::Compile(context, &source, |
138 v8::ScriptCompiler::kNoCompileOptions); | 137 v8::ScriptCompiler::kNoCompileOptions); |
139 } | 138 } |
140 | 139 |
141 void V8InspectorImpl::enableStackCapturingIfNeeded() { | 140 void V8InspectorImpl::enableStackCapturingIfNeeded() { |
142 if (!m_capturingStackTracesCount) | 141 if (!m_capturingStackTracesCount) |
143 V8StackTraceImpl::setCaptureStackTraceForUncaughtExceptions(m_isolate, | 142 V8StackTraceImpl::setCaptureStackTraceForUncaughtExceptions(m_isolate, |
144 true); | 143 true); |
145 ++m_capturingStackTracesCount; | 144 ++m_capturingStackTracesCount; |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 } | 364 } |
366 | 365 |
367 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup( | 366 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup( |
368 int contextGroupId) { | 367 int contextGroupId) { |
369 if (!contextGroupId) return nullptr; | 368 if (!contextGroupId) return nullptr; |
370 SessionMap::iterator iter = m_sessions.find(contextGroupId); | 369 SessionMap::iterator iter = m_sessions.find(contextGroupId); |
371 return iter == m_sessions.end() ? nullptr : iter->second; | 370 return iter == m_sessions.end() ? nullptr : iter->second; |
372 } | 371 } |
373 | 372 |
374 } // namespace v8_inspector | 373 } // namespace v8_inspector |
OLD | NEW |