Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: Source/bindings/core/v8/PrivateScriptRunner.cpp

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/core/v8/PrivateScriptRunner.h" 6 #include "bindings/core/v8/PrivateScriptRunner.h"
7 7
8 #include "bindings/core/v8/DOMWrapperWorld.h" 8 #include "bindings/core/v8/DOMWrapperWorld.h"
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
11 #include "bindings/core/v8/V8PerContextData.h" 11 #include "bindings/core/v8/V8PerContextData.h"
12 #include "bindings/core/v8/V8ScriptRunner.h" 12 #include "bindings/core/v8/V8ScriptRunner.h"
13 #include "core/PrivateScriptSources.h" 13 #include "core/PrivateScriptSources.h"
14 #ifndef NDEBUG 14 #ifndef NDEBUG
15 #include "core/PrivateScriptSourcesForTesting.h" 15 #include "core/PrivateScriptSourcesForTesting.h"
16 #endif 16 #endif
17 17
18 namespace WebCore { 18 namespace blink {
19 19
20 static v8::Handle<v8::Value> compilePrivateScript(v8::Isolate* isolate, String c lassName) 20 static v8::Handle<v8::Value> compilePrivateScript(v8::Isolate* isolate, String c lassName)
21 { 21 {
22 size_t index; 22 size_t index;
23 #ifndef NDEBUG 23 #ifndef NDEBUG
24 for (index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSourcesForTesting); i ndex++) { 24 for (index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSourcesForTesting); i ndex++) {
25 if (className == kPrivateScriptSourcesForTesting[index].name) 25 if (className == kPrivateScriptSourcesForTesting[index].name)
26 break; 26 break;
27 } 27 }
28 if (index != WTF_ARRAY_LENGTH(kPrivateScriptSourcesForTesting)) { 28 if (index != WTF_ARRAY_LENGTH(kPrivateScriptSourcesForTesting)) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 v8::Handle<v8::Value> message = exceptionObject->Get(v8String(isolate, "mess age")); 181 v8::Handle<v8::Value> message = exceptionObject->Get(v8String(isolate, "mess age"));
182 RELEASE_ASSERT(!message.IsEmpty() && message->IsString()); 182 RELEASE_ASSERT(!message.IsEmpty() && message->IsString());
183 v8::Handle<v8::Value> code = exceptionObject->Get(v8String(isolate, "code")) ; 183 v8::Handle<v8::Value> code = exceptionObject->Get(v8String(isolate, "code")) ;
184 RELEASE_ASSERT(!code.IsEmpty() && code->IsInt32()); 184 RELEASE_ASSERT(!code.IsEmpty() && code->IsInt32());
185 // FIXME: Support JavaScript errors such as TypeError, RangeError and Securi tyError. 185 // FIXME: Support JavaScript errors such as TypeError, RangeError and Securi tyError.
186 exceptionState.throwDOMException(toInt32(code), toCoreString(v8::Handle<v8:: String>::Cast(message))); 186 exceptionState.throwDOMException(toInt32(code), toCoreString(v8::Handle<v8:: String>::Cast(message)));
187 exceptionState.throwIfNeeded(); 187 exceptionState.throwIfNeeded();
188 return true; 188 return true;
189 } 189 }
190 190
191 } // namespace WebCore 191 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/PrivateScriptRunner.h ('k') | Source/bindings/core/v8/RetainedDOMInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698