| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 if (DOMDataStore::setReturnValueFromWrapper<V8ArrayBuffer>(info.GetReturnVal
ue(), impl)) | 102 if (DOMDataStore::setReturnValueFromWrapper<V8ArrayBuffer>(info.GetReturnVal
ue(), impl)) |
| 103 return; | 103 return; |
| 104 v8::Handle<v8::Object> wrapper = wrap(impl, info.Holder(), info.GetIsolate()
); | 104 v8::Handle<v8::Object> wrapper = wrap(impl, info.Holder(), info.GetIsolate()
); |
| 105 v8SetReturnValue(info, wrapper); | 105 v8SetReturnValue(info, wrapper); |
| 106 } | 106 } |
| 107 | 107 |
| 108 template<class CallbackInfo> | 108 template<class CallbackInfo> |
| 109 inline void v8SetReturnValueForMainWorld(const CallbackInfo& info, ArrayBuffer*
impl) | 109 inline void v8SetReturnValueForMainWorld(const CallbackInfo& info, ArrayBuffer*
impl) |
| 110 { | 110 { |
| 111 ASSERT(DOMWrapperWorld::current(info.GetIsolate()).isMainWorld()); | 111 ASSERT(DOMWrapperWorld::current(info.GetIsolate())->isMainWorld()); |
| 112 if (UNLIKELY(!impl)) { | 112 if (UNLIKELY(!impl)) { |
| 113 v8SetReturnValueNull(info); | 113 v8SetReturnValueNull(info); |
| 114 return; | 114 return; |
| 115 } | 115 } |
| 116 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8ArrayBuffer>(info.
GetReturnValue(), impl)) | 116 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8ArrayBuffer>(info.
GetReturnValue(), impl)) |
| 117 return; | 117 return; |
| 118 v8::Handle<v8::Value> wrapper = wrap(impl, info.Holder(), info.GetIsolate())
; | 118 v8::Handle<v8::Value> wrapper = wrap(impl, info.Holder(), info.GetIsolate())
; |
| 119 v8SetReturnValue(info, wrapper); | 119 v8SetReturnValue(info, wrapper); |
| 120 } | 120 } |
| 121 | 121 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 151 | 151 |
| 152 template<class CallbackInfo, class Wrappable> | 152 template<class CallbackInfo, class Wrappable> |
| 153 inline void v8SetReturnValueFast(const CallbackInfo& info, PassRefPtr< ArrayBuff
er > impl, Wrappable* wrappable) | 153 inline void v8SetReturnValueFast(const CallbackInfo& info, PassRefPtr< ArrayBuff
er > impl, Wrappable* wrappable) |
| 154 { | 154 { |
| 155 v8SetReturnValueFast(info, impl.get(), wrappable); | 155 v8SetReturnValueFast(info, impl.get(), wrappable); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace WebCore | 158 } // namespace WebCore |
| 159 | 159 |
| 160 #endif // V8ArrayBufferCustom_h | 160 #endif // V8ArrayBufferCustom_h |
| OLD | NEW |