OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
8 * met: | 8 * met: |
9 * | 9 * |
10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 CacheOptions(source.GetResource(), GetFrame()->GetSettings()); | 120 CacheOptions(source.GetResource(), GetFrame()->GetSettings()); |
121 | 121 |
122 // Isolate exceptions that occur when compiling and executing | 122 // Isolate exceptions that occur when compiling and executing |
123 // the code. These exceptions should not interfere with | 123 // the code. These exceptions should not interfere with |
124 // javascript code we might evaluate from C++ when returning | 124 // javascript code we might evaluate from C++ when returning |
125 // from here. | 125 // from here. |
126 v8::TryCatch try_catch(GetIsolate()); | 126 v8::TryCatch try_catch(GetIsolate()); |
127 try_catch.SetVerbose(true); | 127 try_catch.SetVerbose(true); |
128 | 128 |
129 v8::Local<v8::Script> script; | 129 v8::Local<v8::Script> script; |
130 if (!V8ScriptRunner::CompileScript(source, GetIsolate(), | 130 if (!V8ScriptRunner::CompileScript( |
131 access_control_status, v8_cache_options) | 131 ExecutionContext::From(ScriptState::From(context)), source, |
| 132 GetIsolate(), access_control_status, v8_cache_options) |
132 .ToLocal(&script)) | 133 .ToLocal(&script)) |
133 return result; | 134 return result; |
134 | 135 |
135 if (!V8ScriptRunner::RunCompiledScript(GetIsolate(), script, | 136 if (!V8ScriptRunner::RunCompiledScript(GetIsolate(), script, |
136 GetFrame()->GetDocument()) | 137 GetFrame()->GetDocument()) |
137 .ToLocal(&result)) | 138 .ToLocal(&result)) |
138 return result; | 139 return result; |
139 } | 140 } |
140 | 141 |
141 return result; | 142 return result; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 if (!world_name.IsEmpty()) { | 370 if (!world_name.IsEmpty()) { |
370 DOMWrapperWorld::SetNonMainWorldHumanReadableName(world->GetWorldId(), | 371 DOMWrapperWorld::SetNonMainWorldHumanReadableName(world->GetWorldId(), |
371 world_name); | 372 world_name); |
372 } | 373 } |
373 // Make sure the execution context exists. | 374 // Make sure the execution context exists. |
374 WindowProxy(*world); | 375 WindowProxy(*world); |
375 return world; | 376 return world; |
376 } | 377 } |
377 | 378 |
378 } // namespace blink | 379 } // namespace blink |
OLD | NEW |