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

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

Issue 2416843002: Implement FetchEvent.navigationPreload (Closed)
Patch Set: rebase 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 callbackInfo.Holder(), callbackInfo.GetIsolate())); 364 callbackInfo.Holder(), callbackInfo.GetIsolate()));
365 } 365 }
366 366
367 template <typename CallbackInfo, typename T, typename Wrappable> 367 template <typename CallbackInfo, typename T, typename Wrappable>
368 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, 368 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
369 PassRefPtr<T> impl, 369 PassRefPtr<T> impl,
370 const Wrappable* wrappable) { 370 const Wrappable* wrappable) {
371 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 371 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
372 } 372 }
373 373
374 template <typename CallbackInfo, typename Wrappable>
375 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo,
yhirano 2016/10/21 01:48:58 Can you tell me why this is needed?
horo 2016/10/21 10:56:40 navigationPreloadAttributeGetter() in V8FetchEvent
yhirano 2016/10/24 07:13:39 +yukishiino@chromium.org I think this is a bug in
Yuki 2016/10/24 08:43:21 Is this spec-conformant? I've never hard of nulla
376 blink::ScriptPromise promise,
377 const Wrappable* wrappable) {
378 v8SetReturnValue(callbackInfo, promise.v8Value());
379 }
380
374 // Convert v8::String to a WTF::String. If the V8 string is not already 381 // Convert v8::String to a WTF::String. If the V8 string is not already
375 // an external string then it is transformed into an external string at this 382 // an external string then it is transformed into an external string at this
376 // point to avoid repeated conversions. 383 // point to avoid repeated conversions.
377 inline String toCoreString(v8::Local<v8::String> value) { 384 inline String toCoreString(v8::Local<v8::String> value) {
378 return v8StringToWebCoreString<String>(value, Externalize); 385 return v8StringToWebCoreString<String>(value, Externalize);
379 } 386 }
380 387
381 inline String toCoreStringWithNullCheck(v8::Local<v8::String> value) { 388 inline String toCoreStringWithNullCheck(v8::Local<v8::String> value) {
382 if (value.IsEmpty() || value->IsNull()) 389 if (value.IsEmpty() || value->IsNull())
383 return String(); 390 return String();
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 1156
1150 // Freeze a V8 object. The type of the first parameter and the return value is 1157 // Freeze a V8 object. The type of the first parameter and the return value is
1151 // intentionally v8::Value so that this function can wrap toV8(). 1158 // intentionally v8::Value so that this function can wrap toV8().
1152 // If the argument isn't an object, this will crash. 1159 // If the argument isn't an object, this will crash.
1153 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, 1160 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>,
1154 v8::Isolate*); 1161 v8::Isolate*);
1155 1162
1156 } // namespace blink 1163 } // namespace blink
1157 1164
1158 #endif // V8Binding_h 1165 #endif // V8Binding_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698