| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|     54  |     54  | 
|     55 using ::v8::Boolean; |     55 using ::v8::Boolean; | 
|     56 using ::v8::BooleanObject; |     56 using ::v8::BooleanObject; | 
|     57 using ::v8::Context; |     57 using ::v8::Context; | 
|     58 using ::v8::Extension; |     58 using ::v8::Extension; | 
|     59 using ::v8::Function; |     59 using ::v8::Function; | 
|     60 using ::v8::FunctionTemplate; |     60 using ::v8::FunctionTemplate; | 
|     61 using ::v8::Handle; |     61 using ::v8::Handle; | 
|     62 using ::v8::HandleScope; |     62 using ::v8::HandleScope; | 
|     63 using ::v8::Local; |     63 using ::v8::Local; | 
|     64 using ::v8::Name; |     64 using ::v8::Maybe; | 
|     65 using ::v8::Message; |     65 using ::v8::Message; | 
|     66 using ::v8::MessageCallback; |     66 using ::v8::MessageCallback; | 
 |     67 using ::v8::Name; | 
 |     68 using ::v8::None; | 
|     67 using ::v8::Object; |     69 using ::v8::Object; | 
|     68 using ::v8::ObjectTemplate; |     70 using ::v8::ObjectTemplate; | 
|     69 using ::v8::Persistent; |     71 using ::v8::Persistent; | 
 |     72 using ::v8::PropertyAttribute; | 
|     70 using ::v8::Script; |     73 using ::v8::Script; | 
|     71 using ::v8::StackTrace; |     74 using ::v8::StackTrace; | 
|     72 using ::v8::String; |     75 using ::v8::String; | 
|     73 using ::v8::Symbol; |     76 using ::v8::Symbol; | 
|     74 using ::v8::TryCatch; |     77 using ::v8::TryCatch; | 
|     75 using ::v8::Undefined; |     78 using ::v8::Undefined; | 
|     76 using ::v8::UniqueId; |     79 using ::v8::UniqueId; | 
|     77 using ::v8::V8; |     80 using ::v8::V8; | 
|     78 using ::v8::Value; |     81 using ::v8::Value; | 
|     79  |     82  | 
| (...skipping 10782 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  10862       "o\n").As<Object>(); |  10865       "o\n").As<Object>(); | 
|  10863   CHECK(!with_js_getter.IsEmpty()); |  10866   CHECK(!with_js_getter.IsEmpty()); | 
|  10864  |  10867  | 
|  10865   TryCatch try_catch; |  10868   TryCatch try_catch; | 
|  10866  |  10869  | 
|  10867   Local<Value> result = instance->GetRealNamedProperty(v8_str("f")); |  10870   Local<Value> result = instance->GetRealNamedProperty(v8_str("f")); | 
|  10868   CHECK(try_catch.HasCaught()); |  10871   CHECK(try_catch.HasCaught()); | 
|  10869   try_catch.Reset(); |  10872   try_catch.Reset(); | 
|  10870   CHECK(result.IsEmpty()); |  10873   CHECK(result.IsEmpty()); | 
|  10871  |  10874  | 
 |  10875   Maybe<PropertyAttribute> attr = | 
 |  10876       instance->GetRealNamedPropertyAttributes(v8_str("f")); | 
 |  10877   CHECK(!try_catch.HasCaught()); | 
 |  10878   CHECK(attr.has_value); | 
 |  10879   CHECK_EQ(attr.value, None); | 
 |  10880  | 
|  10872   result = another->GetRealNamedProperty(v8_str("f")); |  10881   result = another->GetRealNamedProperty(v8_str("f")); | 
|  10873   CHECK(try_catch.HasCaught()); |  10882   CHECK(try_catch.HasCaught()); | 
|  10874   try_catch.Reset(); |  10883   try_catch.Reset(); | 
|  10875   CHECK(result.IsEmpty()); |  10884   CHECK(result.IsEmpty()); | 
|  10876  |  10885  | 
 |  10886   attr = another->GetRealNamedPropertyAttributes(v8_str("f")); | 
 |  10887   CHECK(!try_catch.HasCaught()); | 
 |  10888   CHECK(attr.has_value); | 
 |  10889   CHECK_EQ(attr.value, None); | 
 |  10890  | 
|  10877   result = another->GetRealNamedPropertyInPrototypeChain(v8_str("f")); |  10891   result = another->GetRealNamedPropertyInPrototypeChain(v8_str("f")); | 
|  10878   CHECK(try_catch.HasCaught()); |  10892   CHECK(try_catch.HasCaught()); | 
|  10879   try_catch.Reset(); |  10893   try_catch.Reset(); | 
|  10880   CHECK(result.IsEmpty()); |  10894   CHECK(result.IsEmpty()); | 
|  10881  |  10895  | 
 |  10896   attr = another->GetRealNamedPropertyAttributesInPrototypeChain(v8_str("f")); | 
 |  10897   CHECK(!try_catch.HasCaught()); | 
 |  10898   CHECK(attr.has_value); | 
 |  10899   CHECK_EQ(attr.value, None); | 
 |  10900  | 
|  10882   result = another->Get(v8_str("f")); |  10901   result = another->Get(v8_str("f")); | 
|  10883   CHECK(try_catch.HasCaught()); |  10902   CHECK(try_catch.HasCaught()); | 
|  10884   try_catch.Reset(); |  10903   try_catch.Reset(); | 
|  10885   CHECK(result.IsEmpty()); |  10904   CHECK(result.IsEmpty()); | 
|  10886  |  10905  | 
|  10887   result = with_js_getter->GetRealNamedProperty(v8_str("f")); |  10906   result = with_js_getter->GetRealNamedProperty(v8_str("f")); | 
|  10888   CHECK(try_catch.HasCaught()); |  10907   CHECK(try_catch.HasCaught()); | 
|  10889   try_catch.Reset(); |  10908   try_catch.Reset(); | 
|  10890   CHECK(result.IsEmpty()); |  10909   CHECK(result.IsEmpty()); | 
|  10891  |  10910  | 
 |  10911   attr = with_js_getter->GetRealNamedPropertyAttributes(v8_str("f")); | 
 |  10912   CHECK(!try_catch.HasCaught()); | 
 |  10913   CHECK(attr.has_value); | 
 |  10914   CHECK_EQ(attr.value, None); | 
 |  10915  | 
|  10892   result = with_js_getter->Get(v8_str("f")); |  10916   result = with_js_getter->Get(v8_str("f")); | 
|  10893   CHECK(try_catch.HasCaught()); |  10917   CHECK(try_catch.HasCaught()); | 
|  10894   try_catch.Reset(); |  10918   try_catch.Reset(); | 
|  10895   CHECK(result.IsEmpty()); |  10919   CHECK(result.IsEmpty()); | 
|  10896 } |  10920 } | 
|  10897  |  10921  | 
|  10898  |  10922  | 
|  10899 static void ThrowingCallbackWithTryCatch( |  10923 static void ThrowingCallbackWithTryCatch( | 
|  10900     const v8::FunctionCallbackInfo<v8::Value>& args) { |  10924     const v8::FunctionCallbackInfo<v8::Value>& args) { | 
|  10901   TryCatch try_catch; |  10925   TryCatch try_catch; | 
| (...skipping 11037 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  21939   } |  21963   } | 
|  21940   { |  21964   { | 
|  21941     v8::TryCatch try_catch; |  21965     v8::TryCatch try_catch; | 
|  21942     uint16_t* data = reinterpret_cast<uint16_t*>(buffer); |  21966     uint16_t* data = reinterpret_cast<uint16_t*>(buffer); | 
|  21943     CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, |  21967     CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, | 
|  21944                                      length).IsEmpty()); |  21968                                      length).IsEmpty()); | 
|  21945     CHECK(try_catch.HasCaught()); |  21969     CHECK(try_catch.HasCaught()); | 
|  21946   } |  21970   } | 
|  21947   free(buffer); |  21971   free(buffer); | 
|  21948 } |  21972 } | 
| OLD | NEW |