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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp

Issue 2769033002: [sql] WebSQL xGetLastError() can be called with null buffer. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemWin.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 int chromiumSleep(sqlite3_vfs* vfs, int microseconds) { 321 int chromiumSleep(sqlite3_vfs* vfs, int microseconds) {
322 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData); 322 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData);
323 return wrappedVfs->xSleep(wrappedVfs, microseconds); 323 return wrappedVfs->xSleep(wrappedVfs, microseconds);
324 } 324 }
325 325
326 int chromiumCurrentTime(sqlite3_vfs* vfs, double* prNow) { 326 int chromiumCurrentTime(sqlite3_vfs* vfs, double* prNow) {
327 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData); 327 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData);
328 return wrappedVfs->xCurrentTime(wrappedVfs, prNow); 328 return wrappedVfs->xCurrentTime(wrappedVfs, prNow);
329 } 329 }
330 330
331 int chromiumGetLastError(sqlite3_vfs* vfs, int e, char* s) { 331 int chromiumGetLastError(sqlite3_vfs* vfs, int nBuf, char* zBuf) {
michaeln 2017/03/23 20:36:33 lgtm
332 // xGetLastError() has never been used by SQLite. The implementation in 332 if (nBuf && zBuf)
333 // os_win.c indicates this is a reasonable implementation. 333 *zBuf = '\0';
334 *s = '\0';
335 return 0; 334 return 0;
336 } 335 }
337 336
338 } // namespace 337 } // namespace
339 338
340 void SQLiteFileSystem::registerSQLiteVFS() { 339 void SQLiteFileSystem::registerSQLiteVFS() {
341 sqlite3_vfs* wrappedVfs = sqlite3_vfs_find("unix"); 340 sqlite3_vfs* wrappedVfs = sqlite3_vfs_find("unix");
342 341
343 // These are implemented by delegating to |wrappedVfs|. 342 // These are implemented by delegating to |wrappedVfs|.
344 // TODO(shess): Implement local versions. 343 // TODO(shess): Implement local versions.
(...skipping 16 matching lines...) Expand all
361 chromiumDlSym, 360 chromiumDlSym,
362 chromiumDlClose, 361 chromiumDlClose,
363 chromiumRandomness, 362 chromiumRandomness,
364 chromiumSleep, 363 chromiumSleep,
365 chromiumCurrentTime, 364 chromiumCurrentTime,
366 chromiumGetLastError}; 365 chromiumGetLastError};
367 sqlite3_vfs_register(&chromium_vfs, 0); 366 sqlite3_vfs_register(&chromium_vfs, 0);
368 } 367 }
369 368
370 } // namespace blink 369 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698