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

Side by Side Diff: Source/bindings/modules/v8/custom/V8SQLResultSetRowListCustom.cpp

Issue 537403002: bindings: Renames from/toInternalPointer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. 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 | 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 exceptionState.throwIfNeeded(); 47 exceptionState.throwIfNeeded();
48 return; 48 return;
49 } 49 }
50 50
51 if (!info[0]->IsNumber()) { 51 if (!info[0]->IsNumber()) {
52 exceptionState.throwTypeError("The index provided is not a number."); 52 exceptionState.throwTypeError("The index provided is not a number.");
53 exceptionState.throwIfNeeded(); 53 exceptionState.throwIfNeeded();
54 return; 54 return;
55 } 55 }
56 56
57 SQLResultSetRowList* rowList = V8SQLResultSetRowList::toNative(info.Holder() ); 57 SQLResultSetRowList* rowList = V8SQLResultSetRowList::toImpl(info.Holder());
58 58
59 unsigned long index = info[0]->IntegerValue(); 59 unsigned long index = info[0]->IntegerValue();
60 if (index >= rowList->length()) { 60 if (index >= rowList->length()) {
61 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound<unsigned>("index", index, rowList->length())); 61 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound<unsigned>("index", index, rowList->length()));
62 exceptionState.throwIfNeeded(); 62 exceptionState.throwIfNeeded();
63 return; 63 return;
64 } 64 }
65 65
66 v8::Local<v8::Object> item = v8::Object::New(info.GetIsolate()); 66 v8::Local<v8::Object> item = v8::Object::New(info.GetIsolate());
67 unsigned numColumns = rowList->columnNames().size(); 67 unsigned numColumns = rowList->columnNames().size();
(...skipping 16 matching lines...) Expand all
84 ASSERT_NOT_REACHED(); 84 ASSERT_NOT_REACHED();
85 } 85 }
86 86
87 item->ForceSet(v8String(info.GetIsolate(), rowList->columnNames()[i]), v alue, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)); 87 item->ForceSet(v8String(info.GetIsolate(), rowList->columnNames()[i]), v alue, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
88 } 88 }
89 89
90 v8SetReturnValue(info, item); 90 v8SetReturnValue(info, item);
91 } 91 }
92 92
93 } // namespace blink 93 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698