mirror of
				https://github.com/bellard/quickjs.git
				synced 2025-05-29 01:49:18 +08:00 
			
		
		
		
	fixed typed array set operation when obj != receiver
This commit is contained in:
		
							parent
							
								
									b0c1a12196
								
							
						
					
					
						commit
						67de495254
					
				
							
								
								
									
										22
									
								
								quickjs.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								quickjs.c
									
									
									
									
									
								
							@ -8757,17 +8757,21 @@ int JS_SetPropertyInternal(JSContext *ctx, JSValueConst obj,
 | 
				
			|||||||
                            return -1;
 | 
					                            return -1;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    typed_array_oob:
 | 
					                    typed_array_oob:
 | 
				
			||||||
                        /* must convert the argument even if out of bound access */
 | 
					                        if (p == p1) {
 | 
				
			||||||
                        if (p1->class_id == JS_CLASS_BIG_INT64_ARRAY ||
 | 
					                            /* must convert the argument even if out of bound access */
 | 
				
			||||||
                            p1->class_id == JS_CLASS_BIG_UINT64_ARRAY) {
 | 
					                            if (p1->class_id == JS_CLASS_BIG_INT64_ARRAY ||
 | 
				
			||||||
                            int64_t v;
 | 
					                                p1->class_id == JS_CLASS_BIG_UINT64_ARRAY) {
 | 
				
			||||||
                            if (JS_ToBigInt64Free(ctx, &v, val))
 | 
					                                int64_t v;
 | 
				
			||||||
                                return -1;
 | 
					                                if (JS_ToBigInt64Free(ctx, &v, val))
 | 
				
			||||||
 | 
					                                    return -1;
 | 
				
			||||||
 | 
					                            } else {
 | 
				
			||||||
 | 
					                                val = JS_ToNumberFree(ctx, val);
 | 
				
			||||||
 | 
					                                JS_FreeValue(ctx, val);
 | 
				
			||||||
 | 
					                                if (JS_IsException(val))
 | 
				
			||||||
 | 
					                                    return -1;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
                        } else {
 | 
					                        } else {
 | 
				
			||||||
                            val = JS_ToNumberFree(ctx, val);
 | 
					 | 
				
			||||||
                            JS_FreeValue(ctx, val);
 | 
					                            JS_FreeValue(ctx, val);
 | 
				
			||||||
                            if (JS_IsException(val))
 | 
					 | 
				
			||||||
                                return -1;
 | 
					 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        return TRUE;
 | 
					                        return TRUE;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
				
			|||||||
@ -115,18 +115,6 @@ test262/test/built-ins/String/prototype/split/cstm-split-on-number-primitive.js:
 | 
				
			|||||||
test262/test/built-ins/String/prototype/split/cstm-split-on-number-primitive.js:22: strict mode: Test262Error: should not be called
 | 
					test262/test/built-ins/String/prototype/split/cstm-split-on-number-primitive.js:22: strict mode: Test262Error: should not be called
 | 
				
			||||||
test262/test/built-ins/String/prototype/split/cstm-split-on-string-primitive.js:22: Test262Error: should not be called
 | 
					test262/test/built-ins/String/prototype/split/cstm-split-on-string-primitive.js:22: Test262Error: should not be called
 | 
				
			||||||
test262/test/built-ins/String/prototype/split/cstm-split-on-string-primitive.js:22: strict mode: Test262Error: should not be called
 | 
					test262/test/built-ins/String/prototype/split/cstm-split-on-string-primitive.js:22: strict mode: Test262Error: should not be called
 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-prototype-chain-set.js:35: Test262Error: value should not be coerced Expected SameValue(«22», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-prototype-chain-set.js:35: strict mode: Test262Error: value should not be coerced Expected SameValue(«22», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-reflect-set.js:35: Test262Error: value should not be coerced Expected SameValue(«32», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-reflect-set.js:35: strict mode: Test262Error: value should not be coerced Expected SameValue(«32», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-prototype-chain-set.js:35: Test262Error: value should not be coerced Expected SameValue(«99», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-prototype-chain-set.js:35: strict mode: Test262Error: value should not be coerced Expected SameValue(«99», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-reflect-set.js:35: Test262Error: value should not be coerced Expected SameValue(«144», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-reflect-set.js:35: strict mode: Test262Error: value should not be coerced Expected SameValue(«144», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds-receiver-is-not-object.js:19: Test262Error: valueOf is not called Expected SameValue(«1», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds-receiver-is-not-object.js:19: strict mode: Test262Error: valueOf is not called Expected SameValue(«1», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds-receiver-is-not-typed-array.js:19: Test262Error: valueOf is not called Expected SameValue(«1», «0») to be true
 | 
					 | 
				
			||||||
test262/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds-receiver-is-not-typed-array.js:19: strict mode: Test262Error: valueOf is not called Expected SameValue(«1», «0») to be true
 | 
					 | 
				
			||||||
test262/test/language/destructuring/binding/keyed-destructuring-property-reference-target-evaluation-order-with-bindings.js:73: Test262Error: Actual [binding::source, binding::sourceKey, sourceKey, get source, binding::defaultValue, binding::varTarget] and expected [binding::source, binding::sourceKey, sourceKey, binding::varTarget, get source, binding::defaultValue] should have the same contents. 
 | 
					test262/test/language/destructuring/binding/keyed-destructuring-property-reference-target-evaluation-order-with-bindings.js:73: Test262Error: Actual [binding::source, binding::sourceKey, sourceKey, get source, binding::defaultValue, binding::varTarget] and expected [binding::source, binding::sourceKey, sourceKey, binding::varTarget, get source, binding::defaultValue] should have the same contents. 
 | 
				
			||||||
test262/test/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js:42: Test262Error: Actual [source, iterator, target, target-key, target-key-tostring, iterator-step, iterator-done, set] and expected [source, iterator, target, target-key, iterator-step, iterator-done, target-key-tostring, set] should have the same contents. 
 | 
					test262/test/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js:42: Test262Error: Actual [source, iterator, target, target-key, target-key-tostring, iterator-step, iterator-done, set] and expected [source, iterator, target, target-key, iterator-step, iterator-done, target-key-tostring, set] should have the same contents. 
 | 
				
			||||||
test262/test/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js:42: strict mode: Test262Error: Actual [source, iterator, target, target-key, target-key-tostring, iterator-step, iterator-done, set] and expected [source, iterator, target, target-key, iterator-step, iterator-done, target-key-tostring, set] should have the same contents. 
 | 
					test262/test/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js:42: strict mode: Test262Error: Actual [source, iterator, target, target-key, target-key-tostring, iterator-step, iterator-done, set] and expected [source, iterator, target, target-key, iterator-step, iterator-done, target-key-tostring, set] should have the same contents. 
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user