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

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

Issue 2501333002: binding: Makes window/frames/self attributes return itself. (Closed)
Patch Set: Completely stopped using cached accessors. Created 4 years, 1 month 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 callbackInfo.Holder(), callbackInfo.GetIsolate())); 363 callbackInfo.Holder(), callbackInfo.GetIsolate()));
364 } 364 }
365 365
366 template <typename CallbackInfo, typename T, typename Wrappable> 366 template <typename CallbackInfo, typename T, typename Wrappable>
367 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, 367 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
368 PassRefPtr<T> impl, 368 PassRefPtr<T> impl,
369 const Wrappable* wrappable) { 369 const Wrappable* wrappable) {
370 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 370 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
371 } 371 }
372 372
373 template <typename CallbackInfo, typename T>
374 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
375 const v8::Local<T> handle,
376 const ScriptWrappable*) {
377 v8SetReturnValue(callbackInfo, handle);
378 }
379
373 // Convert v8::String to a WTF::String. If the V8 string is not already 380 // Convert v8::String to a WTF::String. If the V8 string is not already
374 // an external string then it is transformed into an external string at this 381 // an external string then it is transformed into an external string at this
375 // point to avoid repeated conversions. 382 // point to avoid repeated conversions.
376 inline String toCoreString(v8::Local<v8::String> value) { 383 inline String toCoreString(v8::Local<v8::String> value) {
377 return v8StringToWebCoreString<String>(value, Externalize); 384 return v8StringToWebCoreString<String>(value, Externalize);
378 } 385 }
379 386
380 inline String toCoreStringWithNullCheck(v8::Local<v8::String> value) { 387 inline String toCoreStringWithNullCheck(v8::Local<v8::String> value) {
381 if (value.IsEmpty() || value->IsNull()) 388 if (value.IsEmpty() || value->IsNull())
382 return String(); 389 return String();
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 // If the argument isn't an object, this will crash. 1167 // If the argument isn't an object, this will crash.
1161 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, 1168 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>,
1162 v8::Isolate*); 1169 v8::Isolate*);
1163 1170
1164 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, 1171 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*,
1165 const String& stringifiedJSON, 1172 const String& stringifiedJSON,
1166 ExceptionState&); 1173 ExceptionState&);
1167 } // namespace blink 1174 } // namespace blink
1168 1175
1169 #endif // V8Binding_h 1176 #endif // V8Binding_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698