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

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

Issue 434543002: Introducing the ServiceWorker Cache object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | Source/modules/modules.gypi » ('j') | Source/modules/serviceworkers/FetchStore.h » ('J')
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 * 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 }; 608 };
609 609
610 template<> 610 template<>
611 struct NativeValueTraits<v8::Handle<v8::Value> > { 611 struct NativeValueTraits<v8::Handle<v8::Value> > {
612 static inline v8::Handle<v8::Value> nativeValue(const v8::Handle<v8::Value>& value, v8::Isolate* isolate) 612 static inline v8::Handle<v8::Value> nativeValue(const v8::Handle<v8::Value>& value, v8::Isolate* isolate)
613 { 613 {
614 return value; 614 return value;
615 } 615 }
616 }; 616 };
617 617
618 template<>
619 struct NativeValueTraits<ScriptValue> {
620 static inline ScriptValue nativeValue(const v8::Handle<v8::Value>& value, v8 ::Isolate* isolate)
621 {
622 return ScriptValue(ScriptState::current(isolate), value);
623 }
624 };
625
618 v8::Handle<v8::Value> toV8Sequence(v8::Handle<v8::Value>, uint32_t& length, v8:: Isolate*); 626 v8::Handle<v8::Value> toV8Sequence(v8::Handle<v8::Value>, uint32_t& length, v8:: Isolate*);
619 627
620 // Converts a JavaScript value to an array as per the Web IDL specification: 628 // Converts a JavaScript value to an array as per the Web IDL specification:
621 // http://www.w3.org/TR/2012/CR-WebIDL-20120419/#es-array 629 // http://www.w3.org/TR/2012/CR-WebIDL-20120419/#es-array
622 template <class T, class V8T> 630 template <class T, class V8T>
623 Vector<RefPtr<T> > toRefPtrNativeArrayUnchecked(v8::Local<v8::Value> v8Value, ui nt32_t length, v8::Isolate* isolate, bool* success = 0) 631 Vector<RefPtr<T> > toRefPtrNativeArrayUnchecked(v8::Local<v8::Value> v8Value, ui nt32_t length, v8::Isolate* isolate, bool* success = 0)
624 { 632 {
625 Vector<RefPtr<T> > result; 633 Vector<RefPtr<T> > result;
626 result.reserveInitialCapacity(length); 634 result.reserveInitialCapacity(length);
627 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(v8Value); 635 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(v8Value);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 m_block.Reset(); 979 m_block.Reset();
972 } 980 }
973 981
974 private: 982 private:
975 v8::TryCatch& m_block; 983 v8::TryCatch& m_block;
976 }; 984 };
977 985
978 } // namespace blink 986 } // namespace blink
979 987
980 #endif // V8Binding_h 988 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/modules.gypi » ('j') | Source/modules/serviceworkers/FetchStore.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698