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

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

Issue 209713003: Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 if (DOMDataStore::setReturnValueFromWrapper<Binding>(info.GetReturnValue (), impl)) 85 if (DOMDataStore::setReturnValueFromWrapper<Binding>(info.GetReturnValue (), impl))
86 return; 86 return;
87 v8::Handle<v8::Object> wrapper = wrap(impl, info.Holder(), info.GetIsola te()); 87 v8::Handle<v8::Object> wrapper = wrap(impl, info.Holder(), info.GetIsola te());
88 info.GetReturnValue().Set(wrapper); 88 info.GetReturnValue().Set(wrapper);
89 } 89 }
90 90
91 template<typename CallbackInfo> 91 template<typename CallbackInfo>
92 static void v8SetReturnValueForMainWorld(const CallbackInfo& info, TypedArra y* impl) 92 static void v8SetReturnValueForMainWorld(const CallbackInfo& info, TypedArra y* impl)
93 { 93 {
94 ASSERT(DOMWrapperWorld::current(info.GetIsolate())->isMainWorld()); 94 ASSERT(DOMWrapperWorld::current(info.GetIsolate()).isMainWorld());
95 if (UNLIKELY(!impl)) { 95 if (UNLIKELY(!impl)) {
96 v8SetReturnValueNull(info); 96 v8SetReturnValueNull(info);
97 return; 97 return;
98 } 98 }
99 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<Binding>(info.Ge tReturnValue(), impl)) 99 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<Binding>(info.Ge tReturnValue(), impl))
100 return; 100 return;
101 v8::Handle<v8::Value> wrapper = wrap(impl, info.Holder(), info.GetIsolat e()); 101 v8::Handle<v8::Value> wrapper = wrap(impl, info.Holder(), info.GetIsolat e());
102 info.GetReturnValue().Set(wrapper); 102 info.GetReturnValue().Set(wrapper);
103 } 103 }
104 104
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 template <typename TypedArray> 186 template <typename TypedArray>
187 void V8TypedArray<TypedArray>::derefObject(void* object) 187 void V8TypedArray<TypedArray>::derefObject(void* object)
188 { 188 {
189 static_cast<TypedArray*>(object)->deref(); 189 static_cast<TypedArray*>(object)->deref();
190 } 190 }
191 191
192 192
193 } // namespace WebCode 193 } // namespace WebCode
194 194
195 #endif // V8TypedArrayCustom_h 195 #endif // V8TypedArrayCustom_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8MessageEventCustom.cpp ('k') | Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698