| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2042 } | 2042 } |
| 2043 | 2043 |
| 2044 void RenderFrameImpl::JavaScriptIsolatedWorldRequest::completed( | 2044 void RenderFrameImpl::JavaScriptIsolatedWorldRequest::completed( |
| 2045 const blink::WebVector<v8::Local<v8::Value>>& result) { | 2045 const blink::WebVector<v8::Local<v8::Value>>& result) { |
| 2046 if (!render_frame_impl_.get()) { | 2046 if (!render_frame_impl_.get()) { |
| 2047 return; | 2047 return; |
| 2048 } | 2048 } |
| 2049 | 2049 |
| 2050 if (notify_result_) { | 2050 if (notify_result_) { |
| 2051 base::ListValue list; | 2051 base::ListValue list; |
| 2052 if (!result.isEmpty()) { | 2052 if (!result.empty()) { |
| 2053 // It's safe to always use the main world context when converting | 2053 // It's safe to always use the main world context when converting |
| 2054 // here. V8ValueConverterImpl shouldn't actually care about the | 2054 // here. V8ValueConverterImpl shouldn't actually care about the |
| 2055 // context scope, and it switches to v8::Object's creation context | 2055 // context scope, and it switches to v8::Object's creation context |
| 2056 // when encountered. (from extensions/renderer/script_injection.cc) | 2056 // when encountered. (from extensions/renderer/script_injection.cc) |
| 2057 v8::Local<v8::Context> context = | 2057 v8::Local<v8::Context> context = |
| 2058 render_frame_impl_.get()->frame_->mainWorldScriptContext(); | 2058 render_frame_impl_.get()->frame_->mainWorldScriptContext(); |
| 2059 v8::Context::Scope context_scope(context); | 2059 v8::Context::Scope context_scope(context); |
| 2060 V8ValueConverterImpl converter; | 2060 V8ValueConverterImpl converter; |
| 2061 converter.SetDateAllowed(true); | 2061 converter.SetDateAllowed(true); |
| 2062 converter.SetRegExpAllowed(true); | 2062 converter.SetRegExpAllowed(true); |
| (...skipping 4909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6972 policy(info.defaultPolicy), | 6972 policy(info.defaultPolicy), |
| 6973 replaces_current_history_item(info.replacesCurrentHistoryItem), | 6973 replaces_current_history_item(info.replacesCurrentHistoryItem), |
| 6974 history_navigation_in_new_child_frame( | 6974 history_navigation_in_new_child_frame( |
| 6975 info.isHistoryNavigationInNewChildFrame), | 6975 info.isHistoryNavigationInNewChildFrame), |
| 6976 client_redirect(info.isClientRedirect), | 6976 client_redirect(info.isClientRedirect), |
| 6977 cache_disabled(info.isCacheDisabled), | 6977 cache_disabled(info.isCacheDisabled), |
| 6978 form(info.form), | 6978 form(info.form), |
| 6979 source_location(info.sourceLocation) {} | 6979 source_location(info.sourceLocation) {} |
| 6980 | 6980 |
| 6981 } // namespace content | 6981 } // namespace content |
| OLD | NEW |