| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 bool reportExceptions) { | 68 bool reportExceptions) { |
| 69 v8::TryCatch tryCatch(m_context->GetIsolate()); | 69 v8::TryCatch tryCatch(m_context->GetIsolate()); |
| 70 tryCatch.SetVerbose(reportExceptions); | 70 tryCatch.SetVerbose(reportExceptions); |
| 71 | 71 |
| 72 v8::Local<v8::Value> result = callWithoutExceptionHandling(); | 72 v8::Local<v8::Value> result = callWithoutExceptionHandling(); |
| 73 hadException = tryCatch.HasCaught(); | 73 hadException = tryCatch.HasCaught(); |
| 74 return result; | 74 return result; |
| 75 } | 75 } |
| 76 | 76 |
| 77 v8::Local<v8::Value> V8FunctionCall::callWithoutExceptionHandling() { | 77 v8::Local<v8::Value> V8FunctionCall::callWithoutExceptionHandling() { |
| 78 v8::Context::Scope contextScope(m_context); |
| 79 |
| 78 v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_value); | 80 v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_value); |
| 79 v8::Local<v8::Value> value; | 81 v8::Local<v8::Value> value; |
| 80 if (!thisObject->Get(m_context, m_name).ToLocal(&value)) | 82 if (!thisObject->Get(m_context, m_name).ToLocal(&value)) |
| 81 return v8::Local<v8::Value>(); | 83 return v8::Local<v8::Value>(); |
| 82 | 84 |
| 83 DCHECK(value->IsFunction()); | 85 DCHECK(value->IsFunction()); |
| 84 | 86 |
| 85 v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(value); | 87 v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(value); |
| 86 std::unique_ptr<v8::Local<v8::Value>[]> info( | 88 std::unique_ptr<v8::Local<v8::Value>[]> info( |
| 87 new v8::Local<v8::Value>[m_arguments.size()]); | 89 new v8::Local<v8::Value>[m_arguments.size()]); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 103 m_inspector->client()->unmuteMetrics(contextGroupId); | 105 m_inspector->client()->unmuteMetrics(contextGroupId); |
| 104 m_inspector->unmuteExceptions(contextGroupId); | 106 m_inspector->unmuteExceptions(contextGroupId); |
| 105 } | 107 } |
| 106 | 108 |
| 107 v8::Local<v8::Value> result; | 109 v8::Local<v8::Value> result; |
| 108 if (!maybeResult.ToLocal(&result)) return v8::Local<v8::Value>(); | 110 if (!maybeResult.ToLocal(&result)) return v8::Local<v8::Value>(); |
| 109 return result; | 111 return result; |
| 110 } | 112 } |
| 111 | 113 |
| 112 } // namespace v8_inspector | 114 } // namespace v8_inspector |
| OLD | NEW |