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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.h

Issue 2642643002: Remove CallWith=ScriptState from window/self/frames getters on Window.
Patch Set: Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 class DOMWindow; 57 class DOMWindow;
58 class EventListener; 58 class EventListener;
59 class EventTarget; 59 class EventTarget;
60 class ExceptionState; 60 class ExceptionState;
61 class ExecutionContext; 61 class ExecutionContext;
62 class FlexibleArrayBufferView; 62 class FlexibleArrayBufferView;
63 class Frame; 63 class Frame;
64 class LocalDOMWindow; 64 class LocalDOMWindow;
65 class LocalFrame; 65 class LocalFrame;
66 class NodeFilter; 66 class NodeFilter;
67 class WindowProxyManagerBase;
67 class XPathNSResolver; 68 class XPathNSResolver;
68 69
69 template <typename T> 70 template <typename T>
70 struct V8TypeOf { 71 struct V8TypeOf {
71 STATIC_ONLY(V8TypeOf); 72 STATIC_ONLY(V8TypeOf);
72 // |Type| provides C++ -> V8 type conversion for DOM wrappers. 73 // |Type| provides C++ -> V8 type conversion for DOM wrappers.
73 // The Blink binding code generator will generate specialized version of 74 // The Blink binding code generator will generate specialized version of
74 // V8TypeOf for each wrapper class. 75 // V8TypeOf for each wrapper class.
75 typedef void Type; 76 typedef void Type;
76 }; 77 };
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 330 }
330 331
331 template <typename CallbackInfo> 332 template <typename CallbackInfo>
332 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, 333 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
333 EventTarget* impl, 334 EventTarget* impl,
334 const ScriptWrappable*) { 335 const ScriptWrappable*) {
335 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), 336 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(),
336 callbackInfo.GetIsolate())); 337 callbackInfo.GetIsolate()));
337 } 338 }
338 339
340 // Special version for a DOMWindow that might be detached.
341
342 template <typename CallbackInfo>
343 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
344 WindowProxyManagerBase* impl,
345 const ScriptWrappable*) {
346 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(),
347 callbackInfo.GetIsolate()));
348 }
349
339 template <typename CallbackInfo, typename T, typename Wrappable> 350 template <typename CallbackInfo, typename T, typename Wrappable>
340 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, 351 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
341 PassRefPtr<T> impl, 352 PassRefPtr<T> impl,
342 const Wrappable* wrappable) { 353 const Wrappable* wrappable) {
343 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 354 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
344 } 355 }
345 356
346 template <typename CallbackInfo, typename T> 357 template <typename CallbackInfo, typename T>
347 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, 358 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
348 const v8::Local<T> handle, 359 const v8::Local<T> handle,
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 // If the argument isn't an object, this will crash. 1149 // If the argument isn't an object, this will crash.
1139 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, 1150 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>,
1140 v8::Isolate*); 1151 v8::Isolate*);
1141 1152
1142 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, 1153 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*,
1143 const String& stringifiedJSON, 1154 const String& stringifiedJSON,
1144 ExceptionState&); 1155 ExceptionState&);
1145 } // namespace blink 1156 } // namespace blink
1146 1157
1147 #endif // V8Binding_h 1158 #endif // V8Binding_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698