Changeset 207906 in webkit
- Timestamp:
- Oct 26, 2016 12:23:55 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r207861 r207906 1 2016-10-26 Mark Lam <mark.lam@apple.com> 2 3 JSGenericTypedArrayView::set() should check for exceptions. 4 https://bugs.webkit.org/show_bug.cgi?id=164007 5 <rdar://problem/28853775> 6 7 Reviewed by Filip Pizlo. 8 9 * stress/typed-array-view-set-should-not-crash-on-exception.js: Added. 10 1 11 2016-10-25 Mark Lam <mark.lam@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r207869 r207906 1 2016-10-26 Mark Lam <mark.lam@apple.com> 2 3 JSGenericTypedArrayView::set() should check for exceptions. 4 https://bugs.webkit.org/show_bug.cgi?id=164007 5 <rdar://problem/28853775> 6 7 Reviewed by Filip Pizlo. 8 9 * runtime/JSGenericTypedArrayViewInlines.h: 10 (JSC::JSGenericTypedArrayView<Adaptor>::set): 11 1 12 2016-10-25 Yusuke Suzuki <utatane.tea@gmail.com> 2 13 -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h
r207859 r207906 243 243 ExecState* exec, unsigned offset, JSObject* object, unsigned objectOffset, unsigned length, CopyType type) 244 244 { 245 VM& vm = exec->vm(); 246 auto scope = DECLARE_THROW_SCOPE(vm); 247 245 248 const ClassInfo* ci = object->classInfo(); 246 249 if (ci->typedArrayStorageType == Adaptor::typeValue) { … … 250 253 251 254 RELEASE_ASSERT(other->canAccessRangeQuickly(objectOffset, length)); 252 if (!validateRange(exec, offset, length)) 255 bool success = validateRange(exec, offset, length); 256 ASSERT(!scope.exception() == success); 257 if (!success) 253 258 return false; 254 259 … … 287 292 case NotTypedArray: 288 293 case TypeDataView: { 289 if (!validateRange(exec, offset, length)) 294 bool success = validateRange(exec, offset, length); 295 ASSERT(!scope.exception() == success); 296 if (!success) 290 297 return false; 291 298 … … 293 300 for (unsigned i = 0; i < length; ++i) { 294 301 JSValue value = object->get(exec, i + objectOffset); 295 if (!setIndex(exec, offset + i, value)) 302 RETURN_IF_EXCEPTION(scope, false); 303 bool success = setIndex(exec, offset + i, value); 304 ASSERT(!scope.exception() || !success); 305 if (!success) 296 306 return false; 297 307 }
Note: See TracChangeset
for help on using the changeset viewer.