OLD | NEW |
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 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 Loading... |
321 }; | 321 }; |
322 | 322 |
323 static PassRefPtr<IDBKey> idbKeyFromInspectorObject(JSONObject* key) | 323 static PassRefPtr<IDBKey> idbKeyFromInspectorObject(JSONObject* key) |
324 { | 324 { |
325 RefPtr<IDBKey> idbKey; | 325 RefPtr<IDBKey> idbKey; |
326 | 326 |
327 String type; | 327 String type; |
328 if (!key->getString("type", &type)) | 328 if (!key->getString("type", &type)) |
329 return 0; | 329 return 0; |
330 | 330 |
331 DEFINE_STATIC_LOCAL(String, number, (ASCIILiteral("number"))); | 331 DEFINE_STATIC_LOCAL(String, number, ("number")); |
332 DEFINE_STATIC_LOCAL(String, string, (ASCIILiteral("string"))); | 332 DEFINE_STATIC_LOCAL(String, string, ("string")); |
333 DEFINE_STATIC_LOCAL(String, date, (ASCIILiteral("date"))); | 333 DEFINE_STATIC_LOCAL(String, date, ("date")); |
334 DEFINE_STATIC_LOCAL(String, array, (ASCIILiteral("array"))); | 334 DEFINE_STATIC_LOCAL(String, array, ("array")); |
335 | 335 |
336 if (type == number) { | 336 if (type == number) { |
337 double number; | 337 double number; |
338 if (!key->getNumber("number", &number)) | 338 if (!key->getNumber("number", &number)) |
339 return 0; | 339 return 0; |
340 idbKey = IDBKey::createNumber(number); | 340 idbKey = IDBKey::createNumber(number); |
341 } else if (type == string) { | 341 } else if (type == string) { |
342 String string; | 342 String string; |
343 if (!key->getString("string", &string)) | 343 if (!key->getString("string", &string)) |
344 return 0; | 344 return 0; |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 v8::HandleScope handleScope; | 778 v8::HandleScope handleScope; |
779 v8::Handle<v8::Context> context = document->frame()->script()->mainWorldCont
ext(); | 779 v8::Handle<v8::Context> context = document->frame()->script()->mainWorldCont
ext(); |
780 ASSERT(!context.IsEmpty()); | 780 ASSERT(!context.IsEmpty()); |
781 v8::Context::Scope contextScope(context); | 781 v8::Context::Scope contextScope(context); |
782 | 782 |
783 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(documen
t, objectStoreName, requestCallback); | 783 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(documen
t, objectStoreName, requestCallback); |
784 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); | 784 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); |
785 } | 785 } |
786 | 786 |
787 } // namespace WebCore | 787 } // namespace WebCore |
OLD | NEW |