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

Side by Side Diff: Source/bindings/v8/custom/V8ArrayBufferCustom.h

Issue 217053007: Revert of Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert 213543004 too Created 6 years, 8 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/bindings/v8/custom/V8CustomEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698