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

Side by Side Diff: Source/bindings/v8/V8Initializer.cpp

Issue 39393004: IDL compiler: rename WrapperTypeInfo info => wrapperTypeInfo (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/bindings/v8/V8GCController.cpp ('k') | Source/bindings/v8/V8WindowShell.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "wtf/text/WTFString.h" 52 #include "wtf/text/WTFString.h"
53 #include <v8-debug.h> 53 #include <v8-debug.h>
54 #include <v8-defaults.h> 54 #include <v8-defaults.h>
55 55
56 namespace WebCore { 56 namespace WebCore {
57 57
58 static Frame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data, v 8::Isolate* isolate) 58 static Frame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data, v 8::Isolate* isolate)
59 { 59 {
60 WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data); 60 WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data);
61 61
62 if (V8Window::info.equals(type)) { 62 if (V8Window::wrapperTypeInfo.equals(type)) {
63 v8::Handle<v8::Object> windowWrapper = host->FindInstanceInPrototypeChai n(V8Window::GetTemplate(isolate, worldTypeInMainThread(isolate))); 63 v8::Handle<v8::Object> windowWrapper = host->FindInstanceInPrototypeChai n(V8Window::GetTemplate(isolate, worldTypeInMainThread(isolate)));
64 if (windowWrapper.IsEmpty()) 64 if (windowWrapper.IsEmpty())
65 return 0; 65 return 0;
66 return V8Window::toNative(windowWrapper)->frame(); 66 return V8Window::toNative(windowWrapper)->frame();
67 } 67 }
68 68
69 if (V8History::info.equals(type)) 69 if (V8History::wrapperTypeInfo.equals(type))
70 return V8History::toNative(host)->frame(); 70 return V8History::toNative(host)->frame();
71 71
72 if (V8Location::info.equals(type)) 72 if (V8Location::wrapperTypeInfo.equals(type))
73 return V8Location::toNative(host)->frame(); 73 return V8Location::toNative(host)->frame();
74 74
75 // This function can handle only those types listed above. 75 // This function can handle only those types listed above.
76 ASSERT_NOT_REACHED(); 76 ASSERT_NOT_REACHED();
77 return 0; 77 return 0;
78 } 78 }
79 79
80 static void reportFatalErrorInMainThread(const char* location, const char* messa ge) 80 static void reportFatalErrorInMainThread(const char* location, const char* messa ge)
81 { 81 {
82 int memoryUsageMB = MemoryUsageSupport::actualMemoryUsageMB(); 82 int memoryUsageMB = MemoryUsageSupport::actualMemoryUsageMB();
(...skipping 22 matching lines...) Expand all
105 105
106 v8::Handle<v8::Value> resourceName = message->GetScriptResourceName(); 106 v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
107 bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsStrin g(); 107 bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsStrin g();
108 String resource = shouldUseDocumentURL ? firstWindow->document()->url() : to WebCoreString(resourceName.As<v8::String>()); 108 String resource = shouldUseDocumentURL ? firstWindow->document()->url() : to WebCoreString(resourceName.As<v8::String>());
109 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCr ossOrigin : NotSharableCrossOrigin; 109 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCr ossOrigin : NotSharableCrossOrigin;
110 110
111 RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resource, messag e->GetLineNumber(), message->GetStartColumn() + 1, DOMWrapperWorld::current()); 111 RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resource, messag e->GetLineNumber(), message->GetStartColumn() + 1, DOMWrapperWorld::current());
112 if (V8DOMWrapper::isDOMWrapper(data)) { 112 if (V8DOMWrapper::isDOMWrapper(data)) {
113 v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(data); 113 v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(data);
114 WrapperTypeInfo* type = toWrapperTypeInfo(obj); 114 WrapperTypeInfo* type = toWrapperTypeInfo(obj);
115 if (V8DOMException::info.isSubclass(type)) { 115 if (V8DOMException::wrapperTypeInfo.isSubclass(type)) {
116 DOMException* exception = V8DOMException::toNative(obj); 116 DOMException* exception = V8DOMException::toNative(obj);
117 if (exception && !exception->messageForConsole().isEmpty()) 117 if (exception && !exception->messageForConsole().isEmpty())
118 event->setUnsanitizedMessage("Uncaught " + exception->toStringFo rConsole()); 118 event->setUnsanitizedMessage("Uncaught " + exception->toStringFo rConsole());
119 } 119 }
120 } 120 }
121 121
122 // This method might be called while we're creating a new context. In this c ase, we 122 // This method might be called while we're creating a new context. In this c ase, we
123 // avoid storing the exception object, as we can't create a wrapper during c ontext creation. 123 // avoid storing the exception object, as we can't create a wrapper during c ontext creation.
124 // FIXME: Can we even get here during initialization now that we bail out wh en GetEntered returns an empty handle? 124 // FIXME: Can we even get here during initialization now that we bail out wh en GetEntered returns an empty handle?
125 DOMWrapperWorld* world = DOMWrapperWorld::current(); 125 DOMWrapperWorld* world = DOMWrapperWorld::current();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 v8::ResourceConstraints resourceConstraints; 220 v8::ResourceConstraints resourceConstraints;
221 v8::ConfigureResourceConstraintsForCurrentPlatform(&resourceConstraints); 221 v8::ConfigureResourceConstraintsForCurrentPlatform(&resourceConstraints);
222 uint32_t here; 222 uint32_t here;
223 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 223 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
224 v8::SetResourceConstraints(&resourceConstraints); 224 v8::SetResourceConstraints(&resourceConstraints);
225 225
226 V8PerIsolateData::ensureInitialized(isolate); 226 V8PerIsolateData::ensureInitialized(isolate);
227 } 227 }
228 228
229 } // namespace WebCore 229 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8GCController.cpp ('k') | Source/bindings/v8/V8WindowShell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698