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

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

Issue 77773003: Make WebMIDI use blink Promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 void addHiddenValueToArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, int cac heIndex, v8::Isolate*); 671 void addHiddenValueToArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, int cac heIndex, v8::Isolate*);
672 void removeHiddenValueFromArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, in t cacheIndex, v8::Isolate*); 672 void removeHiddenValueFromArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, in t cacheIndex, v8::Isolate*);
673 void moveEventListenerToNewWrapper(v8::Handle<v8::Object>, EventListener* oldVal ue, v8::Local<v8::Value> newValue, int cacheIndex, v8::Isolate*); 673 void moveEventListenerToNewWrapper(v8::Handle<v8::Object>, EventListener* oldVal ue, v8::Local<v8::Value> newValue, int cacheIndex, v8::Isolate*);
674 674
675 // Converts a DOM object to a v8 value. 675 // Converts a DOM object to a v8 value.
676 // This is a no-inline version of toV8(). If you want to call toV8() 676 // This is a no-inline version of toV8(). If you want to call toV8()
677 // without creating #include cycles, you can use this function instead. 677 // without creating #include cycles, you can use this function instead.
678 // Each specialized implementation will be generated. 678 // Each specialized implementation will be generated.
679 template<typename T> 679 template<typename T>
680 v8::Handle<v8::Value> toV8NoInline(T* impl, v8::Handle<v8::Object> creationConte xt, v8::Isolate*); 680 v8::Handle<v8::Value> toV8NoInline(T* impl, v8::Handle<v8::Object> creationConte xt, v8::Isolate*);
681 template<typename T>
682 v8::Handle<v8::Value> toV8NoInline(T* impl, ExecutionContext* context)
683 {
684 v8::Isolate* isolate = toIsolate(context);
685 v8::Handle<v8::Context> v8Context = toV8Context(context, DOMWrapperWorld::cu rrent(isolate));
686 return toV8NoInline(impl, v8Context->Global(), isolate);
687 }
681 688
682 // Result values for platform object 'deleter' methods, 689 // Result values for platform object 'deleter' methods,
683 // http://www.w3.org/TR/WebIDL/#delete 690 // http://www.w3.org/TR/WebIDL/#delete
684 enum DeleteResult { 691 enum DeleteResult {
685 DeleteSuccess, 692 DeleteSuccess,
686 DeleteReject, 693 DeleteReject,
687 DeleteUnknownProperty 694 DeleteUnknownProperty
688 }; 695 };
689 696
690 class V8IsolateInterruptor : public ThreadState::Interruptor { 697 class V8IsolateInterruptor : public ThreadState::Interruptor {
(...skipping 29 matching lines...) Expand all
720 v8::HandleScope m_handleScope; 727 v8::HandleScope m_handleScope;
721 v8::Handle<v8::Context> m_context; 728 v8::Handle<v8::Context> m_context;
722 v8::Context::Scope m_contextScope; 729 v8::Context::Scope m_contextScope;
723 RefPtr<DOMWrapperWorld> m_world; 730 RefPtr<DOMWrapperWorld> m_world;
724 OwnPtr<V8PerContextData> m_perContextData; 731 OwnPtr<V8PerContextData> m_perContextData;
725 }; 732 };
726 733
727 } // namespace WebCore 734 } // namespace WebCore
728 735
729 #endif // V8Binding_h 736 #endif // V8Binding_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698