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 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 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1870 { | 1870 { |
1871 uint32_t type; | 1871 uint32_t type; |
1872 String name; | 1872 String name; |
1873 String url; | 1873 String url; |
1874 if (!doReadUint32(&type)) | 1874 if (!doReadUint32(&type)) |
1875 return false; | 1875 return false; |
1876 if (!readWebCoreString(&name)) | 1876 if (!readWebCoreString(&name)) |
1877 return false; | 1877 return false; |
1878 if (!readWebCoreString(&url)) | 1878 if (!readWebCoreString(&url)) |
1879 return false; | 1879 return false; |
1880 RefPtr<DOMFileSystem> fs = DOMFileSystem::create(currentExecutionContext
(m_isolate), name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLStr
ing, url)); | 1880 RefPtrWillBeRawPtr<DOMFileSystem> fs = DOMFileSystem::create(currentExec
utionContext(m_isolate), name, static_cast<WebCore::FileSystemType>(type), KURL(
ParsedURLString, url)); |
1881 *value = toV8(fs.release(), v8::Handle<v8::Object>(), m_isolate); | 1881 *value = toV8(fs.release(), v8::Handle<v8::Object>(), m_isolate); |
1882 return true; | 1882 return true; |
1883 } | 1883 } |
1884 | 1884 |
1885 bool readFile(v8::Handle<v8::Value>* value) | 1885 bool readFile(v8::Handle<v8::Value>* value) |
1886 { | 1886 { |
1887 RefPtrWillBeRawPtr<File> file = doReadFileHelper(); | 1887 RefPtrWillBeRawPtr<File> file = doReadFileHelper(); |
1888 if (!file) | 1888 if (!file) |
1889 return false; | 1889 return false; |
1890 *value = toV8(file.release(), v8::Handle<v8::Object>(), m_isolate); | 1890 *value = toV8(file.release(), v8::Handle<v8::Object>(), m_isolate); |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 // If the allocated memory was not registered before, then this class is lik
ely | 2510 // If the allocated memory was not registered before, then this class is lik
ely |
2511 // used in a context other then Worker's onmessage environment and the prese
nce of | 2511 // used in a context other then Worker's onmessage environment and the prese
nce of |
2512 // current v8 context is not guaranteed. Avoid calling v8 then. | 2512 // current v8 context is not guaranteed. Avoid calling v8 then. |
2513 if (m_externallyAllocatedMemory) { | 2513 if (m_externallyAllocatedMemory) { |
2514 ASSERT(v8::Isolate::GetCurrent()); | 2514 ASSERT(v8::Isolate::GetCurrent()); |
2515 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte
rnallyAllocatedMemory); | 2515 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte
rnallyAllocatedMemory); |
2516 } | 2516 } |
2517 } | 2517 } |
2518 | 2518 |
2519 } // namespace WebCore | 2519 } // namespace WebCore |
OLD | NEW |