OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 #include "bindings/v8/PrivateScriptRunner.h" | 6 #include "bindings/core/v8/PrivateScriptRunner.h" |
7 | 7 |
8 #include "bindings/v8/V8Binding.h" | 8 #include "bindings/core/v8/V8Binding.h" |
9 #include "bindings/v8/V8PerContextData.h" | 9 #include "bindings/core/v8/V8PerContextData.h" |
10 #include "bindings/v8/V8ScriptRunner.h" | 10 #include "bindings/core/v8/V8ScriptRunner.h" |
11 #include "core/PrivateScriptSources.h" | 11 #include "core/PrivateScriptSources.h" |
12 | 12 |
13 namespace WebCore { | 13 namespace WebCore { |
14 | 14 |
15 static v8::Handle<v8::Value> compilePrivateScript(v8::Isolate* isolate, String c
lassName) | 15 static v8::Handle<v8::Value> compilePrivateScript(v8::Isolate* isolate, String c
lassName) |
16 { | 16 { |
17 size_t index; | 17 size_t index; |
18 // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is
auto-generated | 18 // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is
auto-generated |
19 // by make_private_script.py. | 19 // by make_private_script.py. |
20 for (index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSources); index++) { | 20 for (index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSources); index++) { |
(...skipping 28 matching lines...) Expand all Loading... |
49 } | 49 } |
50 | 50 |
51 v8::Handle<v8::Value> function = v8::Handle<v8::Object>::Cast(compiledClass)
->Get(v8String(isolate, functionName)); | 51 v8::Handle<v8::Value> function = v8::Handle<v8::Object>::Cast(compiledClass)
->Get(v8String(isolate, functionName)); |
52 RELEASE_ASSERT(!function.IsEmpty()); | 52 RELEASE_ASSERT(!function.IsEmpty()); |
53 RELEASE_ASSERT(function->IsFunction()); | 53 RELEASE_ASSERT(function->IsFunction()); |
54 | 54 |
55 return V8ScriptRunner::callFunction(v8::Handle<v8::Function>::Cast(function)
, scriptState->executionContext(), receiver, argc, argv, isolate); | 55 return V8ScriptRunner::callFunction(v8::Handle<v8::Function>::Cast(function)
, scriptState->executionContext(), receiver, argc, argv, isolate); |
56 } | 56 } |
57 | 57 |
58 } // namespace WebCore | 58 } // namespace WebCore |
OLD | NEW |