OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 22334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22345 CheckCorrectThrow("JSON.stringify(other)"); | 22345 CheckCorrectThrow("JSON.stringify(other)"); |
22346 CheckCorrectThrow("has_own_property(other, 'x')"); | 22346 CheckCorrectThrow("has_own_property(other, 'x')"); |
22347 CheckCorrectThrow("%GetProperty(other, 'x')"); | 22347 CheckCorrectThrow("%GetProperty(other, 'x')"); |
22348 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); | 22348 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); |
22349 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)"); | 22349 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)"); |
22350 CheckCorrectThrow("%DeleteProperty_Sloppy(other, 'x')"); | 22350 CheckCorrectThrow("%DeleteProperty_Sloppy(other, 'x')"); |
22351 CheckCorrectThrow("%DeleteProperty_Strict(other, 'x')"); | 22351 CheckCorrectThrow("%DeleteProperty_Strict(other, 'x')"); |
22352 CheckCorrectThrow("%DeleteProperty_Sloppy(other, '1')"); | 22352 CheckCorrectThrow("%DeleteProperty_Sloppy(other, '1')"); |
22353 CheckCorrectThrow("%DeleteProperty_Strict(other, '1')"); | 22353 CheckCorrectThrow("%DeleteProperty_Strict(other, '1')"); |
22354 CheckCorrectThrow("Object.prototype.hasOwnProperty.call(other, 'x')"); | 22354 CheckCorrectThrow("Object.prototype.hasOwnProperty.call(other, 'x')"); |
22355 CheckCorrectThrow("%HasProperty('x', other)"); | 22355 CheckCorrectThrow("%HasProperty(other, 'x')"); |
22356 CheckCorrectThrow("Object.prototype.propertyIsEnumerable(other, 'x')"); | 22356 CheckCorrectThrow("Object.prototype.propertyIsEnumerable(other, 'x')"); |
22357 // PROPERTY_ATTRIBUTES_NONE = 0 | 22357 // PROPERTY_ATTRIBUTES_NONE = 0 |
22358 CheckCorrectThrow("%DefineAccessorPropertyUnchecked(" | 22358 CheckCorrectThrow("%DefineAccessorPropertyUnchecked(" |
22359 "other, 'x', null, null, 1)"); | 22359 "other, 'x', null, null, 1)"); |
22360 | 22360 |
22361 // Reset the failed access check callback so it does not influence | 22361 // Reset the failed access check callback so it does not influence |
22362 // the other tests. | 22362 // the other tests. |
22363 isolate->SetFailedAccessCheckCallbackFunction(NULL); | 22363 isolate->SetFailedAccessCheckCallbackFunction(NULL); |
22364 } | 22364 } |
22365 | 22365 |
(...skipping 2970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
25336 CHECK(object->SetPrototype(context.local(), v8::Null(isolate)).IsNothing()); | 25336 CHECK(object->SetPrototype(context.local(), v8::Null(isolate)).IsNothing()); |
25337 | 25337 |
25338 // The original prototype is still there | 25338 // The original prototype is still there |
25339 Local<Value> new_proto = | 25339 Local<Value> new_proto = |
25340 object->Get(context.local(), v8_str("__proto__")).ToLocalChecked(); | 25340 object->Get(context.local(), v8_str("__proto__")).ToLocalChecked(); |
25341 CHECK(new_proto->IsObject()); | 25341 CHECK(new_proto->IsObject()); |
25342 CHECK(new_proto.As<v8::Object>() | 25342 CHECK(new_proto.As<v8::Object>() |
25343 ->Equals(context.local(), original_proto) | 25343 ->Equals(context.local(), original_proto) |
25344 .FromJust()); | 25344 .FromJust()); |
25345 } | 25345 } |
OLD | NEW |