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

Side by Side Diff: Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp

Issue 24118003: Pass isolate to v8::Undefined() function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 template<class CallbackInfo> 59 template<class CallbackInfo>
60 static v8::Handle<v8::Value> getItem(HTMLAllCollection* collection, v8::Handle<v 8::Value> argument, const CallbackInfo& callbackInfo) 60 static v8::Handle<v8::Value> getItem(HTMLAllCollection* collection, v8::Handle<v 8::Value> argument, const CallbackInfo& callbackInfo)
61 { 61 {
62 v8::Local<v8::Uint32> index = argument->ToArrayIndex(); 62 v8::Local<v8::Uint32> index = argument->ToArrayIndex();
63 if (index.IsEmpty()) { 63 if (index.IsEmpty()) {
64 v8::Handle<v8::Value> result = getNamedItems(collection, toWebCoreString (argument->ToString()), callbackInfo); 64 v8::Handle<v8::Value> result = getNamedItems(collection, toWebCoreString (argument->ToString()), callbackInfo);
65 65
66 if (result.IsEmpty()) 66 if (result.IsEmpty())
67 return v8::Undefined(); 67 return v8::Undefined(callbackInfo.GetIsolate());
68 68
69 return result; 69 return result;
70 } 70 }
71 71
72 RefPtr<Node> result = collection->item(index->Uint32Value()); 72 RefPtr<Node> result = collection->item(index->Uint32Value());
73 return toV8(result.release(), callbackInfo.Holder(), callbackInfo.GetIsolate ()); 73 return toV8(result.release(), callbackInfo.Holder(), callbackInfo.GetIsolate ());
74 } 74 }
75 75
76 void V8HTMLAllCollection::itemMethodCustom(const v8::FunctionCallbackInfo<v8::Va lue>& args) 76 void V8HTMLAllCollection::itemMethodCustom(const v8::FunctionCallbackInfo<v8::Va lue>& args)
77 { 77 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if (index.IsEmpty()) 110 if (index.IsEmpty())
111 return; 111 return;
112 112
113 if (Node* node = imp->namedItemWithIndex(name, index->Uint32Value())) { 113 if (Node* node = imp->namedItemWithIndex(name, index->Uint32Value())) {
114 v8SetReturnValueFast(args, node, imp); 114 v8SetReturnValueFast(args, node, imp);
115 return; 115 return;
116 } 116 }
117 } 117 }
118 118
119 } // namespace WebCore 119 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/bindings/v8/custom/V8IDBAnyCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698