| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 request->onError(DOMError::create(UnknownError, permissionDeniedErrorMes
sage)); | 148 request->onError(DOMError::create(UnknownError, permissionDeniedErrorMes
sage)); |
| 149 return request; | 149 return request; |
| 150 } | 150 } |
| 151 | 151 |
| 152 Platform::current()->idbFactory()->deleteDatabase(name, WebIDBCallbacksImpl:
:create(request).leakPtr(), createDatabaseIdentifierFromSecurityOrigin(scriptSta
te->executionContext()->securityOrigin())); | 152 Platform::current()->idbFactory()->deleteDatabase(name, WebIDBCallbacksImpl:
:create(request).leakPtr(), createDatabaseIdentifierFromSecurityOrigin(scriptSta
te->executionContext()->securityOrigin())); |
| 153 return request; | 153 return request; |
| 154 } | 154 } |
| 155 | 155 |
| 156 short IDBFactory::cmp(ScriptState* scriptState, const ScriptValue& firstValue, c
onst ScriptValue& secondValue, ExceptionState& exceptionState) | 156 short IDBFactory::cmp(ScriptState* scriptState, const ScriptValue& firstValue, c
onst ScriptValue& secondValue, ExceptionState& exceptionState) |
| 157 { | 157 { |
| 158 IDBKey* first = firstValue.to<IDBKey*>(exceptionState); | 158 IDBKey* first = ScriptValue::to<IDBKey*>(scriptState->isolate(), firstValue,
exceptionState); |
| 159 IDBKey* second = secondValue.to<IDBKey*>(exceptionState); | 159 IDBKey* second = ScriptValue::to<IDBKey*>(scriptState->isolate(), secondValu
e, exceptionState); |
| 160 | 160 |
| 161 ASSERT(first); | 161 ASSERT(first); |
| 162 ASSERT(second); | 162 ASSERT(second); |
| 163 | 163 |
| 164 if (!first->isValid() || !second->isValid()) { | 164 if (!first->isValid() || !second->isValid()) { |
| 165 exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErro
rMessage); | 165 exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErro
rMessage); |
| 166 return 0; | 166 return 0; |
| 167 } | 167 } |
| 168 | 168 |
| 169 return static_cast<short>(first->compare(second)); | 169 return static_cast<short>(first->compare(second)); |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |