Changeset 203320 in webkit
- Timestamp:
- Jul 15, 2016, 9:16:30 PM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSTypedArray.cpp
r198488 r203320 104 104 JSGlobalObject* globalObject = exec->lexicalGlobalObject(); 105 105 if (!buffer) { 106 exec->vm().throwException(exec, createOutOfMemoryError(exec));106 throwOutOfMemoryError(exec); 107 107 return nullptr; 108 108 } -
trunk/Source/JavaScriptCore/ChangeLog
r203318 r203320 1 2016-07-15 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC] Convert the remaining createOutOfMemoryError()+throwException() into throwOutOfMemoryError() 4 https://bugs.webkit.org/show_bug.cgi?id=159665 5 6 Reviewed by Saam Barati. 7 8 * API/JSTypedArray.cpp: 9 (createTypedArray): 10 * runtime/Error.cpp: 11 (JSC::createOutOfMemoryError): 12 * runtime/Error.h: 13 * runtime/ExceptionHelpers.cpp: 14 (JSC::throwOutOfMemoryError): 15 * runtime/JSArrayBufferConstructor.cpp: 16 (JSC::constructArrayBuffer): 17 * runtime/JSArrayBufferPrototype.cpp: 18 (JSC::arrayBufferProtoFuncSlice): 19 * runtime/JSGenericTypedArrayViewInlines.h: 20 (JSC::JSGenericTypedArrayView<Adaptor>::create): 21 (JSC::JSGenericTypedArrayView<Adaptor>::createUninitialized): 22 1 23 2016-07-15 Benjamin Poulain <bpoulain@apple.com> 2 24 -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r202890 r203320 98 98 return ErrorInstance::create(exec, globalObject->vm(), globalObject->URIErrorConstructor()->errorStructure(), message, appender, TypeNothing, true); 99 99 } 100 101 JSObject* createOutOfMemoryError(ExecState* exec, ErrorInstance::SourceAppender appender)102 {103 return createError(exec, ASCIILiteral("Out of memory"), appender);104 }105 106 100 107 101 class FindFirstCallerFrameWithCodeblockFunctor { … … 284 278 JSObject* createOutOfMemoryError(ExecState* exec) 285 279 { 286 return create OutOfMemoryError(exec, nullptr);280 return createError(exec, ASCIILiteral("Out of memory"), nullptr); 287 281 } 288 282 -
trunk/Source/JavaScriptCore/runtime/Error.h
r202890 r203320 49 49 JSObject* createNotEnoughArgumentsError(ExecState*, ErrorInstance::SourceAppender); 50 50 JSObject* createURIError(ExecState*, const String&, ErrorInstance::SourceAppender); 51 JSObject* createOutOfMemoryError(ExecState*, ErrorInstance::SourceAppender);52 51 53 52 -
trunk/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp
r202242 r203320 95 95 auto buffer = ArrayBuffer::tryCreate(length, 1); 96 96 if (!buffer) 97 return throwVMError(exec, createOutOfMemoryError(exec));97 return JSValue::encode(throwOutOfMemoryError(exec)); 98 98 99 99 Structure* arrayBufferStructure = InternalFunction::createSubclassStructure(exec, exec->newTarget(), constructor->globalObject()->arrayBufferStructure()); -
trunk/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp
r202890 r203320 61 61 RefPtr<ArrayBuffer> newBuffer = thisObject->impl()->slice(begin, end); 62 62 if (!newBuffer) 63 return throwVMError(exec, createOutOfMemoryError(exec));63 return JSValue::encode(throwOutOfMemoryError(exec)); 64 64 65 65 Structure* structure = callee->globalObject()->arrayBufferStructure(); -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h
r203204 r203320 51 51 ConstructionContext context(exec->vm(), structure, length, sizeof(typename Adaptor::Type)); 52 52 if (!context) { 53 exec->vm().throwException(exec, createOutOfMemoryError(exec));54 return 0;53 throwOutOfMemoryError(exec); 54 return nullptr; 55 55 } 56 56 JSGenericTypedArrayView* result = … … 69 69 ConstructionContext::DontInitialize); 70 70 if (!context) { 71 exec->vm().throwException(exec, createOutOfMemoryError(exec));72 return 0;71 throwOutOfMemoryError(exec); 72 return nullptr; 73 73 } 74 74 JSGenericTypedArrayView* result =
Note:
See TracChangeset
for help on using the changeset viewer.