Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 } | 91 } |
| 92 m_contentType = m_contentType.lower(); | 92 m_contentType = m_contentType.lower(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 if (!m_hasFileProperties) | 95 if (!m_hasFileProperties) |
| 96 return true; | 96 return true; |
| 97 | 97 |
| 98 v8::Local<v8::Value> lastModified; | 98 v8::Local<v8::Value> lastModified; |
| 99 TONATIVE_DEFAULT(bool, containsLastModified, DictionaryHelper::get(dictionar y, "lastModified", lastModified), false); | 99 TONATIVE_DEFAULT(bool, containsLastModified, DictionaryHelper::get(dictionar y, "lastModified", lastModified), false); |
| 100 if (containsLastModified) { | 100 if (containsLastModified) { |
| 101 TONATIVE_DEFAULT(long long, lastModifiedInt, toInt64(isolate, lastModifi ed), false); | 101 TONATIVE_DEFAULT(long long, lastModifiedInt, toInt64(isolate, lastModifi ed, NormalConversion, exceptionState), false); |
|
haraken
2015/03/17 17:19:03
If toInt64 fails and exceptionState is set, should
Jens Widell
2015/03/17 17:25:00
Yeah, we should just have
long long lastModifie
| |
| 102 setLastModified(static_cast<double>(lastModifiedInt)); | 102 setLastModified(static_cast<double>(lastModifiedInt)); |
| 103 } else { | 103 } else { |
| 104 setDefaultLastModified(); | 104 setDefaultLastModified(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 return true; | 107 return true; |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool processBlobParts(v8::Isolate* isolate, v8::Local<v8::Object> blobParts, boo l normalizeLineEndingsToNative, BlobData& blobData) | 110 bool processBlobParts(v8::Isolate* isolate, v8::Local<v8::Object> blobParts, boo l normalizeLineEndingsToNative, BlobData& blobData) |
| 111 { | 111 { |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 133 TOSTRING_DEFAULT(V8StringResource<>, stringValue, item, false); | 133 TOSTRING_DEFAULT(V8StringResource<>, stringValue, item, false); |
| 134 blobData.appendText(stringValue, normalizeLineEndingsToNative); | 134 blobData.appendText(stringValue, normalizeLineEndingsToNative); |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 return true; | 137 return true; |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace V8BlobCustomHelpers | 140 } // namespace V8BlobCustomHelpers |
| 141 | 141 |
| 142 } // namespace blink | 142 } // namespace blink |
| OLD | NEW |