Skip to content

Commit

Permalink
Fix an issue that prevented an exception raised in a handler callback…
Browse files Browse the repository at this point in the history
… to be caught and reported (#70)
  • Loading branch information
kasper committed Apr 14, 2016
1 parent e07e64e commit 393afab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ Release: dd.mm.yyyy
### Improvements

- Objects that implement `Iterable` can be traversed. Namely, `Screen` and `Space`.
- Other small updates.
- Improvements to memory management and other small improvements.

### Bug Fixes

- Improve error handling in preprocessing ([#65](https://github.com/kasper/phoenix/issues/65)).
- Fix an issue that prevented an exception raised in a handler callback to be caught and reported ([#70](https://github.com/kasper/phoenix/issues/70)).
- Fix an issue that prevented setting the frame for a window correctly while moving it to a smaller screen ([#84](https://github.com/kasper/phoenix/issues/84)).

### API
Expand Down
6 changes: 1 addition & 5 deletions Phoenix/PHHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ - (void) manageCallback:(JSValue *)callback {

- (void) callWithArguments:(NSArray *)arguments {

// Create a new scope for callback
JSValue *callback = self.callback.value;
JSContext *scope = [[JSContext alloc] initWithVirtualMachine:callback.context.virtualMachine];
JSValue *function = [JSValue valueWithObject:callback inContext:scope];

JSValue *function = self.callback.value;
[function callWithArguments:arguments];
}

Expand Down

0 comments on commit 393afab

Please sign in to comment.