| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 namespace blink { | 76 namespace blink { |
| 77 | 77 |
| 78 NodeFilter* toNodeFilter(v8::Local<v8::Value> callback, | 78 NodeFilter* toNodeFilter(v8::Local<v8::Value> callback, |
| 79 v8::Local<v8::Object> creationContext, | 79 v8::Local<v8::Object> creationContext, |
| 80 ScriptState* scriptState) { | 80 ScriptState* scriptState) { |
| 81 if (callback->IsNull()) | 81 if (callback->IsNull()) |
| 82 return nullptr; | 82 return nullptr; |
| 83 NodeFilter* filter = NodeFilter::create(); | 83 NodeFilter* filter = NodeFilter::create(); |
| 84 | 84 |
| 85 v8::Local<v8::Value> filterWrapper = | 85 v8::Local<v8::Value> filterWrapper = |
| 86 toV8(filter, creationContext, scriptState->isolate()); | 86 ToV8(filter, creationContext, scriptState->isolate()); |
| 87 if (filterWrapper.IsEmpty()) | 87 if (filterWrapper.IsEmpty()) |
| 88 return nullptr; | 88 return nullptr; |
| 89 | 89 |
| 90 NodeFilterCondition* condition = V8NodeFilterCondition::create( | 90 NodeFilterCondition* condition = V8NodeFilterCondition::create( |
| 91 callback, filterWrapper.As<v8::Object>(), scriptState); | 91 callback, filterWrapper.As<v8::Object>(), scriptState); |
| 92 filter->setCondition(condition); | 92 filter->setCondition(condition); |
| 93 | 93 |
| 94 return filter; | 94 return filter; |
| 95 } | 95 } |
| 96 | 96 |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 if (!v8Call(v8::JSON::Parse(isolate, v8String(isolate, stringifiedJSON)), | 1012 if (!v8Call(v8::JSON::Parse(isolate, v8String(isolate, stringifiedJSON)), |
| 1013 parsed, tryCatch)) { | 1013 parsed, tryCatch)) { |
| 1014 if (tryCatch.HasCaught()) | 1014 if (tryCatch.HasCaught()) |
| 1015 exceptionState.rethrowV8Exception(tryCatch.Exception()); | 1015 exceptionState.rethrowV8Exception(tryCatch.Exception()); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 return parsed; | 1018 return parsed; |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 } // namespace blink | 1021 } // namespace blink |
| OLD | NEW |