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

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

Issue 958053003: Removed funky Maybe constructor and made fields private. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/runtime/runtime-scopes.cc ('k') | test/cctest/test-heap.cc » ('j') | 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 10698 matching lines...) Expand 10 before | Expand all | Expand 10 after
10709 TryCatch try_catch; 10709 TryCatch try_catch;
10710 10710
10711 Local<Value> result = instance->GetRealNamedProperty(v8_str("f")); 10711 Local<Value> result = instance->GetRealNamedProperty(v8_str("f"));
10712 CHECK(try_catch.HasCaught()); 10712 CHECK(try_catch.HasCaught());
10713 try_catch.Reset(); 10713 try_catch.Reset();
10714 CHECK(result.IsEmpty()); 10714 CHECK(result.IsEmpty());
10715 10715
10716 Maybe<PropertyAttribute> attr = 10716 Maybe<PropertyAttribute> attr =
10717 instance->GetRealNamedPropertyAttributes(v8_str("f")); 10717 instance->GetRealNamedPropertyAttributes(v8_str("f"));
10718 CHECK(!try_catch.HasCaught()); 10718 CHECK(!try_catch.HasCaught());
10719 CHECK(attr.has_value); 10719 CHECK(Just(None) == attr);
10720 CHECK_EQ(attr.value, None);
10721 10720
10722 result = another->GetRealNamedProperty(v8_str("f")); 10721 result = another->GetRealNamedProperty(v8_str("f"));
10723 CHECK(try_catch.HasCaught()); 10722 CHECK(try_catch.HasCaught());
10724 try_catch.Reset(); 10723 try_catch.Reset();
10725 CHECK(result.IsEmpty()); 10724 CHECK(result.IsEmpty());
10726 10725
10727 attr = another->GetRealNamedPropertyAttributes(v8_str("f")); 10726 attr = another->GetRealNamedPropertyAttributes(v8_str("f"));
10728 CHECK(!try_catch.HasCaught()); 10727 CHECK(!try_catch.HasCaught());
10729 CHECK(attr.has_value); 10728 CHECK(Just(None) == attr);
10730 CHECK_EQ(attr.value, None);
10731 10729
10732 result = another->GetRealNamedPropertyInPrototypeChain(v8_str("f")); 10730 result = another->GetRealNamedPropertyInPrototypeChain(v8_str("f"));
10733 CHECK(try_catch.HasCaught()); 10731 CHECK(try_catch.HasCaught());
10734 try_catch.Reset(); 10732 try_catch.Reset();
10735 CHECK(result.IsEmpty()); 10733 CHECK(result.IsEmpty());
10736 10734
10737 attr = another->GetRealNamedPropertyAttributesInPrototypeChain(v8_str("f")); 10735 attr = another->GetRealNamedPropertyAttributesInPrototypeChain(v8_str("f"));
10738 CHECK(!try_catch.HasCaught()); 10736 CHECK(!try_catch.HasCaught());
10739 CHECK(attr.has_value); 10737 CHECK(Just(None) == attr);
10740 CHECK_EQ(attr.value, None);
10741 10738
10742 result = another->Get(v8_str("f")); 10739 result = another->Get(v8_str("f"));
10743 CHECK(try_catch.HasCaught()); 10740 CHECK(try_catch.HasCaught());
10744 try_catch.Reset(); 10741 try_catch.Reset();
10745 CHECK(result.IsEmpty()); 10742 CHECK(result.IsEmpty());
10746 10743
10747 result = with_js_getter->GetRealNamedProperty(v8_str("f")); 10744 result = with_js_getter->GetRealNamedProperty(v8_str("f"));
10748 CHECK(try_catch.HasCaught()); 10745 CHECK(try_catch.HasCaught());
10749 try_catch.Reset(); 10746 try_catch.Reset();
10750 CHECK(result.IsEmpty()); 10747 CHECK(result.IsEmpty());
10751 10748
10752 attr = with_js_getter->GetRealNamedPropertyAttributes(v8_str("f")); 10749 attr = with_js_getter->GetRealNamedPropertyAttributes(v8_str("f"));
10753 CHECK(!try_catch.HasCaught()); 10750 CHECK(!try_catch.HasCaught());
10754 CHECK(attr.has_value); 10751 CHECK(Just(None) == attr);
10755 CHECK_EQ(attr.value, None);
10756 10752
10757 result = with_js_getter->Get(v8_str("f")); 10753 result = with_js_getter->Get(v8_str("f"));
10758 CHECK(try_catch.HasCaught()); 10754 CHECK(try_catch.HasCaught());
10759 try_catch.Reset(); 10755 try_catch.Reset();
10760 CHECK(result.IsEmpty()); 10756 CHECK(result.IsEmpty());
10761 } 10757 }
10762 10758
10763 10759
10764 static void ThrowingCallbackWithTryCatch( 10760 static void ThrowingCallbackWithTryCatch(
10765 const v8::FunctionCallbackInfo<v8::Value>& args) { 10761 const v8::FunctionCallbackInfo<v8::Value>& args) {
(...skipping 10815 matching lines...) Expand 10 before | Expand all | Expand 10 after
21581 } 21577 }
21582 { 21578 {
21583 v8::TryCatch try_catch; 21579 v8::TryCatch try_catch;
21584 uint16_t* data = reinterpret_cast<uint16_t*>(buffer); 21580 uint16_t* data = reinterpret_cast<uint16_t*>(buffer);
21585 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, 21581 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString,
21586 length).IsEmpty()); 21582 length).IsEmpty());
21587 CHECK(try_catch.HasCaught()); 21583 CHECK(try_catch.HasCaught());
21588 } 21584 }
21589 free(buffer); 21585 free(buffer);
21590 } 21586 }
OLDNEW
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698