| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/sandbox_status_extension_android.h" | 5 #include "chrome/renderer/sandbox_status_extension_android.h" |
| 6 | 6 |
| 7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return; | 141 return; |
| 142 | 142 |
| 143 v8::Isolate* isolate = blink::MainThreadIsolate(); | 143 v8::Isolate* isolate = blink::MainThreadIsolate(); |
| 144 v8::HandleScope handle_scope(isolate); | 144 v8::HandleScope handle_scope(isolate); |
| 145 v8::Local<v8::Context> context = | 145 v8::Local<v8::Context> context = |
| 146 render_frame()->GetWebFrame()->MainWorldScriptContext(); | 146 render_frame()->GetWebFrame()->MainWorldScriptContext(); |
| 147 v8::Context::Scope context_scope(context); | 147 v8::Context::Scope context_scope(context); |
| 148 v8::Local<v8::Function> callback_local = | 148 v8::Local<v8::Function> callback_local = |
| 149 v8::Local<v8::Function>::New(isolate, *callback); | 149 v8::Local<v8::Function>::New(isolate, *callback); |
| 150 | 150 |
| 151 std::unique_ptr<content::V8ValueConverter> converter( | 151 v8::Local<v8::Value> argv[] = { |
| 152 content::V8ValueConverter::create()); | 152 content::V8ValueConverter::Create()->ToV8Value(status.get(), context)}; |
| 153 | |
| 154 v8::Local<v8::Value> argv[] = {converter->ToV8Value(status.get(), context)}; | |
| 155 render_frame()->GetWebFrame()->CallFunctionEvenIfScriptDisabled( | 153 render_frame()->GetWebFrame()->CallFunctionEvenIfScriptDisabled( |
| 156 callback_local, v8::Object::New(isolate), 1, argv); | 154 callback_local, v8::Object::New(isolate), 1, argv); |
| 157 } | 155 } |
| OLD | NEW |