| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 int arrayIndex) { | 910 int arrayIndex) { |
| 911 v8::Local<v8::Value> arrayValue = object->GetInternalField(arrayIndex); | 911 v8::Local<v8::Value> arrayValue = object->GetInternalField(arrayIndex); |
| 912 if (!arrayValue->IsArray()) | 912 if (!arrayValue->IsArray()) |
| 913 return; | 913 return; |
| 914 v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(arrayValue); | 914 v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(arrayValue); |
| 915 for (int i = array->Length() - 1; i >= 0; --i) { | 915 for (int i = array->Length() - 1; i >= 0; --i) { |
| 916 v8::Local<v8::Value> item; | 916 v8::Local<v8::Value> item; |
| 917 if (!array->Get(isolate->GetCurrentContext(), i).ToLocal(&item)) | 917 if (!array->Get(isolate->GetCurrentContext(), i).ToLocal(&item)) |
| 918 return; | 918 return; |
| 919 if (item->StrictEquals(value)) { | 919 if (item->StrictEquals(value)) { |
| 920 array->Delete(isolate->GetCurrentContext(), i); | 920 array->Delete(isolate->GetCurrentContext(), i).ToChecked(); |
| 921 return; | 921 return; |
| 922 } | 922 } |
| 923 } | 923 } |
| 924 } | 924 } |
| 925 | 925 |
| 926 void moveEventListenerToNewWrapper(v8::Isolate* isolate, | 926 void moveEventListenerToNewWrapper(v8::Isolate* isolate, |
| 927 v8::Local<v8::Object> object, | 927 v8::Local<v8::Object> object, |
| 928 EventListener* oldValue, | 928 EventListener* oldValue, |
| 929 v8::Local<v8::Value> newValue, | 929 v8::Local<v8::Value> newValue, |
| 930 int arrayIndex) { | 930 int arrayIndex) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 if (!v8Call(v8::JSON::Parse(isolate, v8String(isolate, stringifiedJSON)), | 972 if (!v8Call(v8::JSON::Parse(isolate, v8String(isolate, stringifiedJSON)), |
| 973 parsed, tryCatch)) { | 973 parsed, tryCatch)) { |
| 974 if (tryCatch.HasCaught()) | 974 if (tryCatch.HasCaught()) |
| 975 exceptionState.rethrowV8Exception(tryCatch.Exception()); | 975 exceptionState.rethrowV8Exception(tryCatch.Exception()); |
| 976 } | 976 } |
| 977 | 977 |
| 978 return parsed; | 978 return parsed; |
| 979 } | 979 } |
| 980 | 980 |
| 981 } // namespace blink | 981 } // namespace blink |
| OLD | NEW |