| 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 28 matching lines...) Expand all Loading... |
| 39 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" | 39 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" |
| 40 #include "wtf/DateMath.h" | 40 #include "wtf/DateMath.h" |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 namespace V8BlobCustomHelpers { | 44 namespace V8BlobCustomHelpers { |
| 45 | 45 |
| 46 ParsedProperties::ParsedProperties(bool hasFileProperties) | 46 ParsedProperties::ParsedProperties(bool hasFileProperties) |
| 47 : m_normalizeLineEndingsToNative(false) | 47 : m_normalizeLineEndingsToNative(false) |
| 48 , m_hasFileProperties(hasFileProperties) | 48 , m_hasFileProperties(hasFileProperties) |
| 49 #ifndef NDEBUG | 49 #if ENABLE(ASSERT) |
| 50 , m_hasLastModified(false) | 50 , m_hasLastModified(false) |
| 51 #endif // NDEBUG | 51 #endif // ENABLE(ASSERT) |
| 52 { | 52 { |
| 53 } | 53 } |
| 54 | 54 |
| 55 void ParsedProperties::setLastModified(double lastModified) | 55 void ParsedProperties::setLastModified(double lastModified) |
| 56 { | 56 { |
| 57 ASSERT(m_hasFileProperties); | 57 ASSERT(m_hasFileProperties); |
| 58 ASSERT(!m_hasLastModified); | 58 ASSERT(!m_hasLastModified); |
| 59 m_lastModified = lastModified; | 59 m_lastModified = lastModified; |
| 60 #ifndef NDEBUG | 60 #if ENABLE(ASSERT) |
| 61 m_hasLastModified = true; | 61 m_hasLastModified = true; |
| 62 #endif // NDEBUG | 62 #endif // ENABLE(ASSERT) |
| 63 } | 63 } |
| 64 | 64 |
| 65 void ParsedProperties::setDefaultLastModified() | 65 void ParsedProperties::setDefaultLastModified() |
| 66 { | 66 { |
| 67 setLastModified(currentTime()); | 67 setLastModified(currentTime()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, co
nst char* blobClassName, ExceptionState& exceptionState, v8::Isolate* isolate) | 70 bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, co
nst char* blobClassName, ExceptionState& exceptionState, v8::Isolate* isolate) |
| 71 { | 71 { |
| 72 TONATIVE_DEFAULT(Dictionary, dictionary, Dictionary(propertyBag, isolate), f
alse); | 72 TONATIVE_DEFAULT(Dictionary, dictionary, Dictionary(propertyBag, isolate), f
alse); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 TOSTRING_DEFAULT(V8StringResource<>, stringValue, item, false); | 132 TOSTRING_DEFAULT(V8StringResource<>, stringValue, item, false); |
| 133 blobData.appendText(stringValue, normalizeLineEndingsToNative); | 133 blobData.appendText(stringValue, normalizeLineEndingsToNative); |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 return true; | 136 return true; |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace V8BlobCustomHelpers | 139 } // namespace V8BlobCustomHelpers |
| 140 | 140 |
| 141 } // namespace WebCore | 141 } // namespace WebCore |
| OLD | NEW |