提交 355ce649 编写于 作者: A anthony

8015303: [macosx] Application launched via custom URL Scheme does not receive URL

Summary: Make copies of event parameters
Reviewed-by: anthony, swingler, serb
Contributed-by: NJames Tomson <james.b.tomson@gmail.com>
上级 318cc2cc
...@@ -110,8 +110,14 @@ ...@@ -110,8 +110,14 @@
- (void)_handleOpenURLEvent:(NSAppleEventDescriptor *)openURLEvent withReplyEvent:(NSAppleEventDescriptor *)replyEvent - (void)_handleOpenURLEvent:(NSAppleEventDescriptor *)openURLEvent withReplyEvent:(NSAppleEventDescriptor *)replyEvent
{ {
// Make an explicit copy of the passed events as they may be invalidated by the time they're processed
NSAppleEventDescriptor *openURLEventCopy = [openURLEvent copy];
NSAppleEventDescriptor *replyEventCopy = [replyEvent copy];
[self.queue addObject:[^(){ [self.queue addObject:[^(){
[self.realDelegate _handleOpenURLEvent:openURLEvent withReplyEvent:replyEvent]; [self.realDelegate _handleOpenURLEvent:openURLEventCopy withReplyEvent:replyEventCopy];
[openURLEventCopy release];
[replyEventCopy release];
} copy]]; } copy]];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册