| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 v8::Local<v8::Value> mainWorldDetail = | 135 v8::Local<v8::Value> mainWorldDetail = |
| 136 privateDetail.getFromMainWorld(scriptState, event); | 136 privateDetail.getFromMainWorld(scriptState, event); |
| 137 if (!mainWorldDetail.IsEmpty()) { | 137 if (!mainWorldDetail.IsEmpty()) { |
| 138 event->setSerializedDetail( | 138 event->setSerializedDetail( |
| 139 SerializedScriptValue::serializeAndSwallowExceptions( | 139 SerializedScriptValue::serializeAndSwallowExceptions( |
| 140 info.GetIsolate(), mainWorldDetail)); | 140 info.GetIsolate(), mainWorldDetail)); |
| 141 detail = event->serializedDetail()->deserialize(); | 141 detail = event->serializedDetail()->deserialize(); |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 // |detail| should be null when it is an empty handle because its default valu
e is null. | 145 // |detail| should be null when it is an empty handle because its default |
| 146 // value is null. |
| 146 if (detail.IsEmpty()) | 147 if (detail.IsEmpty()) |
| 147 detail = v8::Null(info.GetIsolate()); | 148 detail = v8::Null(info.GetIsolate()); |
| 148 privateDetail.set(scriptState->context(), info.Holder(), detail); | 149 privateDetail.set(scriptState->context(), info.Holder(), detail); |
| 149 v8SetReturnValue(info, detail); | 150 v8SetReturnValue(info, detail); |
| 150 } | 151 } |
| 151 | 152 |
| 152 } // namespace blink | 153 } // namespace blink |
| OLD | NEW |