Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Side by Side Diff: test/cctest/test-api.cc

Issue 935033003: Move LookupResult into crankshaft as that's now the only place where it's still used (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/property.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 v8::Isolate* isolate = CcTest::isolate(); 1930 v8::Isolate* isolate = CcTest::isolate();
1931 v8::HandleScope scope(isolate); 1931 v8::HandleScope scope(isolate);
1932 LocalContext env; 1932 LocalContext env;
1933 v8::Local<v8::Value> res = CompileRun("var a = []; a;"); 1933 v8::Local<v8::Value> res = CompileRun("var a = []; a;");
1934 i::Handle<i::JSObject> a(v8::Utils::OpenHandle(v8::Object::Cast(*res))); 1934 i::Handle<i::JSObject> a(v8::Utils::OpenHandle(v8::Object::Cast(*res)));
1935 CHECK(a->map()->instance_descriptors()->IsFixedArray()); 1935 CHECK(a->map()->instance_descriptors()->IsFixedArray());
1936 CHECK_GT(i::FixedArray::cast(a->map()->instance_descriptors())->length(), 0); 1936 CHECK_GT(i::FixedArray::cast(a->map()->instance_descriptors())->length(), 0);
1937 CompileRun("Object.defineProperty(a, 'length', { writable: false });"); 1937 CompileRun("Object.defineProperty(a, 'length', { writable: false });");
1938 CHECK_EQ(i::FixedArray::cast(a->map()->instance_descriptors())->length(), 0); 1938 CHECK_EQ(i::FixedArray::cast(a->map()->instance_descriptors())->length(), 0);
1939 // But we should still have an ExecutableAccessorInfo. 1939 // But we should still have an ExecutableAccessorInfo.
1940 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1941 i::LookupResult lookup(i_isolate);
1942 i::Handle<i::String> name(v8::Utils::OpenHandle(*v8_str("length"))); 1940 i::Handle<i::String> name(v8::Utils::OpenHandle(*v8_str("length")));
1943 i::LookupIterator it(a, name, i::LookupIterator::OWN_SKIP_INTERCEPTOR); 1941 i::LookupIterator it(a, name, i::LookupIterator::OWN_SKIP_INTERCEPTOR);
1944 CHECK_EQ(i::LookupIterator::ACCESSOR, it.state()); 1942 CHECK_EQ(i::LookupIterator::ACCESSOR, it.state());
1945 CHECK(it.GetAccessors()->IsExecutableAccessorInfo()); 1943 CHECK(it.GetAccessors()->IsExecutableAccessorInfo());
1946 } 1944 }
1947 1945
1948 1946
1949 THREADED_TEST(UndefinedIsNotEnumerable) { 1947 THREADED_TEST(UndefinedIsNotEnumerable) {
1950 LocalContext env; 1948 LocalContext env;
1951 v8::HandleScope scope(env->GetIsolate()); 1949 v8::HandleScope scope(env->GetIsolate());
(...skipping 19989 matching lines...) Expand 10 before | Expand all | Expand 10 after
21941 } 21939 }
21942 { 21940 {
21943 v8::TryCatch try_catch; 21941 v8::TryCatch try_catch;
21944 uint16_t* data = reinterpret_cast<uint16_t*>(buffer); 21942 uint16_t* data = reinterpret_cast<uint16_t*>(buffer);
21945 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, 21943 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString,
21946 length).IsEmpty()); 21944 length).IsEmpty());
21947 CHECK(try_catch.HasCaught()); 21945 CHECK(try_catch.HasCaught());
21948 } 21946 }
21949 free(buffer); 21947 free(buffer);
21950 } 21948 }
OLDNEW
« no previous file with comments | « src/property.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698