| 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 15 matching lines...) Expand all Loading... |
| 26 #include "modules/indexeddb/IDBKeyRange.h" | 26 #include "modules/indexeddb/IDBKeyRange.h" |
| 27 | 27 |
| 28 #include "bindings/core/v8/ExceptionState.h" | 28 #include "bindings/core/v8/ExceptionState.h" |
| 29 #include "bindings/modules/v8/ToV8ForModules.h" | 29 #include "bindings/modules/v8/ToV8ForModules.h" |
| 30 #include "bindings/modules/v8/V8BindingForModules.h" | 30 #include "bindings/modules/v8/V8BindingForModules.h" |
| 31 #include "core/dom/ExceptionCode.h" | 31 #include "core/dom/ExceptionCode.h" |
| 32 #include "modules/indexeddb/IDBDatabase.h" | 32 #include "modules/indexeddb/IDBDatabase.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 // TODO(cmumford): Should we still use this? |
| 36 IDBKeyRange* IDBKeyRange::fromScriptValue(ExecutionContext* context, const Scrip
tValue& value, ExceptionState& exceptionState) | 37 IDBKeyRange* IDBKeyRange::fromScriptValue(ExecutionContext* context, const Scrip
tValue& value, ExceptionState& exceptionState) |
| 37 { | 38 { |
| 38 if (value.isUndefined() || value.isNull()) | 39 if (value.isUndefined() || value.isNull()) |
| 39 return nullptr; | 40 return nullptr; |
| 40 | 41 |
| 41 IDBKeyRange* range = ScriptValue::to<IDBKeyRange*>(toIsolate(context), value
, exceptionState); | 42 IDBKeyRange* range = ScriptValue::to<IDBKeyRange*>(toIsolate(context), value
, exceptionState); |
| 42 if (range) | 43 if (range) |
| 43 return range; | 44 return range; |
| 44 | 45 |
| 45 IDBKey* key = ScriptValue::to<IDBKey*>(toIsolate(context), value, exceptionS
tate); | 46 IDBKey* key = ScriptValue::to<IDBKey*>(toIsolate(context), value, exceptionS
tate); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 return false; | 185 return false; |
| 185 } else { | 186 } else { |
| 186 if (c > 0) | 187 if (c > 0) |
| 187 return false; | 188 return false; |
| 188 } | 189 } |
| 189 } | 190 } |
| 190 return true; | 191 return true; |
| 191 } | 192 } |
| 192 | 193 |
| 193 } // namespace blink | 194 } // namespace blink |
| OLD | NEW |