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

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

Issue 513203002: Introduce MIDIInputMap and MIDIOutputMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@iterator-adhoc
Patch Set: Remove custom bindings. Created 6 years, 3 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 ~V8RethrowTryCatchScope() 953 ~V8RethrowTryCatchScope()
954 { 954 {
955 // ReThrow() is a no-op if no exception has been caught, so always call. 955 // ReThrow() is a no-op if no exception has been caught, so always call.
956 m_block.ReThrow(); 956 m_block.ReThrow();
957 } 957 }
958 958
959 private: 959 private:
960 v8::TryCatch& m_block; 960 v8::TryCatch& m_block;
961 }; 961 };
962 962
963 // Returns an object representing {done: true, value: undefined}.
964 v8::Local<v8::Value> v8DoneIteratorResult(v8::Isolate*);
965
966 // Returns an object representing {done: false, value: |value|}.
967 v8::Local<v8::Value> v8IteratorResult(v8::Isolate*, v8::Handle<v8::Value>);
968 template <typename T>
969 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value)
970 {
971 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value( value, scriptState->context()->Global(), scriptState->isolate()));
972 }
973
963 } // namespace blink 974 } // namespace blink
964 975
965 #endif // V8Binding_h 976 #endif // V8Binding_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698